Releases: posit-dev/posit-sdk-py
v0.10.0
What's Changed
- feat: add method to retrieve active bundle by @tdstein in #404
- feat: improve task polling with exponential backoff by @tdstein in #408
- feat: add
metrics.hits
, with support for newinstrumentation/content/hits
endpoint by @toph-allen in #410
New Contributors
- @toph-allen made their first contribution in #410
Full Changelog: v0.9.0...v0.10.0
v0.9.0
This update includes integration support for AWS, integration support improvements for Posit Workbench, a faster Packages API, and improved handling of request bodies on redirects.
What's Changed
- feat: implement Posit Workbench credentials strategy and make credentials strategy fallback options more explicit by @dbkegley #384
- feat: support request body forwarding on redirects by @tdstein in #390
- feat: speed up the Packages API by @tdstein in #396
- feat: add support for AWS integration content session token exchange by @mconflitti-pbc in #399
- feat: add helper for AWS credentials by @mconflitti-pbc in #397
New Contributors
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
- fix: import from typing_extensions instead of typing by @tdstein in #365
- feat: Add viewer api key provider to integrations module(s) by @mconflitti-pbc in #372
- fix: Update with_user_session_token method to be more robust and allow local development by @mconflitti-pbc in #376
- docs: Add docs for
ContentItem
information by @schloerke in #374
New Contributors
- @mconflitti-pbc made their first contribution in #372
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- feat: Add
Permissions.delete(*permissions)
method by @schloerke in #339 - feat: Add
User.groups
andGroup.members
by @schloerke in #341 - feat: Add
Permission.create(principal:User | Group)
support by @schloerke in #343 - feat: Add/test many tag, tags, and content item tags methods by @schloerke in #346
- feat: Add client credential oauth integration support + related databricks helpers to SDK by @zackverham in #348
- feat: Add
Tag.update() -> Tag
method by @schloerke in #351 - feat: add environments by @tdstein in #355
- feat: Add support for system cache runtime by @schloerke in #352
- docs: update API documentation to show all resources by @tdstein in #370
Full Changelog: v0.6.0...0.7.0
v0.6.0
What's Changed
- feat: add version check support by @tdstein in #299
- feat: add create local user support by @tdstein in #305
- feat: add vanities by @tdstein in #310
- feat: add jobs by @tdstein in #314
- fix: remove all warnings from attribute access by @tdstein in #323
- feat: Content repository resource by @zackverham in #300
- fix: raise AttributeError instead of returning None on getattr by @tdstein in #329
- feat: add packages and content packages by @tdstein in #313
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- fix: use correct args and kwargs definitions by @tdstein in #256
- feat!: implement snowflake auth helpers by @dbkegley in #268
- feat: deprecates field access by attribute. by @tdstein in #266
- feat: add oauth session, integration, and association apis @zackverham in #267 and #286
- fix: content overload signatures by @tdstein in #290
- feat: add find_by method to content by @tdstein in #296
Breaking Changes
- The positional argument order of
posit.connect.external.PositCredentialsStrategy
has changed in #268
New Contributors
- @zackverham made their first contribution in #267
- @dependabot made their first contribution in #287
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
- refactor!: apply flake8 builtin rules by @tdstein in #248
- feat: replace restart environment variable hash with Unix epoch by @tdstein in #251
- feat!: improve compatibility with Databricks SQL client by @dbkegley in #252
Breaking Changes
- refactor: rename
bundles.create
method argument frominput
toarchive
by @tdstein in #248 - refactor: rename
bundles.get
method argument fromid
touid
by @tdstein in #248 - refactor: rename
permissions.get
method argument fromid
touid
by @tdstein in #248 - refactor: rename
tasks.get
method argument fromid
touid
by @tdstein in #248 - refactor: rewrite
external.databricks
helpers for better interop betweendatabricks-sdk-python
anddatabricks-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
from posit import connect
client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.create(input="archive.tar.gz")
Current
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
from posit import connect
client = connect.Client()
content = client.content.find_one()
bundle = content.bundles.get(id="3bb97e21-8216-445c-95b7-288578ca4311")
Current
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
from posit import connect
client = connect.Client()
content = client.content.find_one()
permission = content.permissions.get(id="3bb97e21-8216-445c-95b7-288578ca4311")
Current
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
from posit import connect
client = connect.Client()
task = client.tasks.get(id="CmsfmnfDDyRUrsAc")
Current
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
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
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: v0.3.1...v0.4.0