Releases: posit-dev/posit-sdk-py
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
v0.3.1
v0.3.0
v0.2.2
v0.2.1
What's Changed
- feat: add dataclass to represent ContentItem owner by @brooklynbagel in #190
- feat: Check for X-Deprecated-Endpoint header by @nealrichardson in #195
New Contributors
- @brooklynbagel made their first contribution in #190
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- chore: updates classifiers by @tdstein in #133
- docs: adds linting for docstrings by @tdstein in #136
- feat: adds permissions find, find_one, and update by @tdstein in #145
- fix: removes dangling NotImplementedError throws by @tdstein in #146
- feat: adds permissions create by @tdstein in #147
- feat: adds permissions get by @tdstein in #148
- feat: adds permission delete by @tdstein in #149
- feat: adds permissions count by @tdstein in #150
- style: replace unpacking usage with dict.update by @tdstein in #151
- docs: adds warning for make behavior by @tdstein in #154
- feat: adds content create by @tdstein in #155
- feat: adds content-item delete by @tdstein in #156
- fix: removes resource warning messages. by @tdstein in #159
- feat: adds bundles by @tdstein in #161
- feat: adds visits find and find_one by @tdstein in #163
- feat: adds owner property to content-item. by @tdstein in #160
- refactor: reduces complexity of urls module. by @tdstein in #168
- feat: adds usage by @tdstein in #166
- style: sets ruff docstring-code-line-length to dynamic by @tdstein in #171
- style: applies formatting by @tdstein in #172
- build: delete empty directories on clean by @tdstein in #177
- feat: adds metrics view events by @tdstein in #170
- feat: adds bundle create and download by @tdstein in #179
- feat: adds bundle/content deploy and task management by @tdstein in #183
- feat: sets default value for optional event fields by @tdstein in #185
- refactor: renames views to usage by @tdstein in #186
Full Changelog: v0.1.0...v0.2.0