Posit-sdk

Latest version: v0.6.0

Safety actively analyzes 688944 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.6.0

What's Changed
* feat: add version check support by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/299
* feat: add create local user support by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/305
* feat: add vanities by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/310
* feat: add jobs by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/314
* fix: remove all warnings from attribute access by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/323
* feat: Content repository resource by zackverham in https://github.com/posit-dev/posit-sdk-py/pull/300
* fix: raise AttributeError instead of returning None on __getattr__ by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/329
* feat: add packages and content packages by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/313


**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.5.0...v0.6.0

0.5.0

What's Changed
* fix: use correct args and kwargs definitions by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/256
* feat!: implement snowflake auth helpers by dbkegley in https://github.com/posit-dev/posit-sdk-py/pull/268
* feat: deprecates field access by attribute. by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/266
* feat: add oauth session, integration, and association apis zackverham in https://github.com/posit-dev/posit-sdk-py/pull/267 and https://github.com/posit-dev/posit-sdk-py/pull/286
* fix: content overload signatures by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/290
* feat: add find_by method to content by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/296

Breaking Changes

- The positional argument order of `posit.connect.external.PositCredentialsStrategy` has changed in https://github.com/posit-dev/posit-sdk-py/pull/268

New Contributors
* zackverham made their first contribution in https://github.com/posit-dev/posit-sdk-py/pull/267
* dependabot made their first contribution in https://github.com/posit-dev/posit-sdk-py/pull/287

**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.4.0...v0.5.0

0.4.0

What's Changed
* refactor!: apply flake8 builtin rules by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/248
* feat: replace restart environment variable hash with Unix epoch by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/251
* feat!: improve compatibility with Databricks SQL client by dbkegley in https://github.com/posit-dev/posit-sdk-py/pull/252

Breaking Changes
* refactor: rename `bundles.create` method argument from `input` to `archive` by tdstein in 248
* refactor: rename `bundles.get` method argument from `id` to `uid` by tdstein in 248
* refactor: rename `permissions.get` method argument from `id` to `uid` by tdstein in 248
* refactor: rename `tasks.get` method argument from `id` to `uid` by tdstein in 248
* refactor: rewrite `external.databricks` helpers for better interop between `databricks-sdk-python` and `databricks-sql-python` by dbkegley 252

Migration Guide

This release includes changes to remove shadowing of builtins. As a result, the argument names for various methods have changed. This change only impacts method invocations using keyword-arguments. Methods invoked without keyword-arguments do not require adjustments.

refactor: rename `bundles.create` method argument from `input` to `archive` by tdstein in 248

Rename the keyword-argument `input` to `archive`.

Previous
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.create(input="archive.tar.gz")


Current
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.create(archive="archive.tar.gz")


refactor: rename `bundles.get` method argument from `id` to `uid` by tdstein in 248

Rename the keyword-argument `id` to `uid`.

Previous
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.get(id="3bb97e21-8216-445c-95b7-288578ca4311")


Current
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.get(uid="3bb97e21-8216-445c-95b7-288578ca4311")


refactor: rename `permissions.get` method argument from `id` to `uid` by tdstein in 248

Rename the keyword-argument `id` to `uid`.

Previous
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
permission = content.permissions.get(id="3bb97e21-8216-445c-95b7-288578ca4311")


Current
python
from posit import connect

client = connect.Client()
content = client.content.find_one()
permission = content.permissions.get(uid="3bb97e21-8216-445c-95b7-288578ca4311")


refactor: rename `tasks.get` method argument from `id` to `uid` by tdstein in 248

Rename the keyword-argument `id` to `uid`.

Previous
python
from posit import connect

client = connect.Client()
task = client.tasks.get(id="CmsfmnfDDyRUrsAc")


Current
python
from posit import connect

client = connect.Client()
task = client.tasks.get(uid="CmsfmnfDDyRUrsAc")



refactor: rewrite `external.databricks` helpers for better interop between `databricks-sdk-python` and `databricks-sql-python` by dbkegley 252

Previous
python
from databricks import sql
from databricks.sdk.core import ApiClient, Config
from databricks.sdk.service.iam import CurrentUserAPI
from posit.connect.external.databricks import viewer_credentials_provider

session_token = "<read-from-http-header>"
credentials_provider = viewer_credentials_provider(
user_session_token=session_token
)

databricks-sdk usage
cfg = Config(
host=DATABRICKS_HOST_URL,
credentials_provider=credentials_provider
)
databricks_user = CurrentUserAPI(ApiClient(cfg)).me()
print(databricks_user)

databricks-sql usage
with sql.connect(
server_hostname=DATABRICKS_HOST,
http_path=SQL_HTTP_PATH,
auth_type="databricks-oauth", old local credential_provider fallback behavior
credentials_provider=credentials_provider,
) as connection:
with connection.cursor() as cursor:
cursor.execute("SELECT * FROM samples.nyctaxi.trips LIMIT 10;")
result = cursor.fetchall()
print(result)


Current

> [!WARNING]
> Requires `databricks-sdk>=0.29.0`

python
from databricks import sql
from databricks.sdk.core import ApiClient, Config, databricks_cli
from databricks.sdk.service.iam import CurrentUserAPI
from posit.connect.external.databricks import PositCredentialsStrategy

session_token = "<read-from-http-header>"
posit_strategy = PositCredentialsStrategy(
local_strategy=databricks_cli, new local credential_provider fallback behavior
user_session_token=session_token)
cfg = Config(
host=DATABRICKS_HOST_URL,
uses Posit's custom credential_strategy if running on Connect,
otherwise falls back to the strategy defined by local_strategy
credentials_strategy=posit_strategy)

databricks_user = CurrentUserAPI(ApiClient(cfg)).me()
print(databricks_user)

with sql.connect(
server_hostname=DATABRICKS_HOST,
http_path=SQL_HTTP_PATH,
https://github.com/databricks/databricks-sql-python/issues/148#issuecomment-2271561365
credentials_provider=posit_strategy.sql_credentials_provider(cfg)
) as connection:
with connection.cursor() as cursor:
cursor.execute("SELECT * FROM samples.nyctaxi.trips LIMIT 10;")
result = cursor.fetchall()
print(result)


**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.3.1...v0.4.0

0.3.1

What's Changed
* feat: content render and restart by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/236
* feat: add the payload to ClientError and structure message by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/242
* feat: add content type helpers by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/243


**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.3.0...v0.3.1

0.3.0

What's Changed
* feat: get content for user by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/226
* feat!: accept positional arguments when creating a client by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/231


**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.2.2...v0.3.0

0.2.2

What's Changed
* feat: always resolve content owner by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/224
* feat: adds groups by tdstein in https://github.com/posit-dev/posit-sdk-py/pull/227


**Full Changelog**: https://github.com/posit-dev/posit-sdk-py/compare/v0.2.1...v0.2.2

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.