Reusable Webex Bring Your Own Data Source management utilities
Project description
Webex BYODS Python SDK
Reusable Python utilities for managing Webex Bring Your Own Data Source (BYODS) data sources. The SDK supports registration, retrieval, updates, schema discovery, JWT claim inspection, service-app authentication, and data source token extension.
The SDK does not read credentials from files, environment variables, or cloud secret managers. The host application owns secret retrieval and provides an explicit token provider to the SDK.
Install
Until publication, install from a local checkout:
python3 -m pip install -e .
Quick start with a service-app token
- Create and authorize a Webex Service App.
- Select
spark-admin:datasource_readto list data sources andspark-admin:datasource_writeto register, update, or extend them. See the Data Sources API reference for the required permissions. - Retrieve the authorized service app's access token and pass it directly to the SDK from your application's secret source. Do not commit it or embed it in source code.
from webex_byods import StaticAccessTokenProvider, WebexDataSourceClient
client = WebexDataSourceClient(
token_provider=StaticAccessTokenProvider(service_app_access_token)
)
data_sources = client.list_all_data_sources()
Refresh service-app tokens
For automatic service-app token acquisition, the host application supplies credentials and a personal-token provider. It can obtain those values from its own configuration, AWS Secrets Manager, or another secret system.
from webex_byods import (
ServiceAppCredentials,
StaticAccessTokenProvider,
WebexDataSourceClient,
WebexServiceAppTokenProvider,
)
credentials = ServiceAppCredentials(
app_id="service-app-id",
client_id="service-app-client-id",
client_secret="service-app-client-secret",
target_org_id="target-org-id",
)
service_token_provider = WebexServiceAppTokenProvider(
credentials,
StaticAccessTokenProvider("personal-access-token"),
)
client = WebexDataSourceClient(token_provider=service_token_provider)
OAuthRefreshTokenProvider is available when the host application manages an
OAuth refresh token. Providers use InMemoryTokenStore by default; applications
that need persistence can supply their own TokenStore implementation.
Use the client
data_sources = client.list_all_data_sources()
schemas = client.get_data_source_schemas()
result = client.extend_data_source_token(
data_source_id="data-source-id",
token_lifetime_minutes=1440,
)
BYODS API operations return dictionaries containing success, data or
error, and status_code. A 401 response causes one retry with
token_provider.get_access_token(force_refresh=True).
WebexDataSourceManager remains an alias for WebexDataSourceClient during
the transition. TokenManager is deprecated; use
WebexServiceAppTokenProvider instead.
Development
python3 -m pip install -e ".[dev]"
python3 -m pytest -q
ruff check .
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webex_byods_sdk-0.2.0.tar.gz.
File metadata
- Download URL: webex_byods_sdk-0.2.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22d3b85732a83844f01a8edcbee8c30da5517514616328bee8a657f4086b6f3
|
|
| MD5 |
57e99ffb8d65de9daff62c33fc0827ef
|
|
| BLAKE2b-256 |
fd2139339aa5858be855b66af5a57e66c1160d66b9b9f080a7524d8476c6acf1
|
Provenance
The following attestation bundles were made for webex_byods_sdk-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on WebexCommunity/webex-python-byods-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webex_byods_sdk-0.2.0.tar.gz -
Subject digest:
d22d3b85732a83844f01a8edcbee8c30da5517514616328bee8a657f4086b6f3 - Sigstore transparency entry: 2138919965
- Sigstore integration time:
-
Permalink:
WebexCommunity/webex-python-byods-sdk@9dbc60820aca976f74d43cba6bd75e9b023c8231 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/WebexCommunity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9dbc60820aca976f74d43cba6bd75e9b023c8231 -
Trigger Event:
release
-
Statement type:
File details
Details for the file webex_byods_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: webex_byods_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c27d2dfad367dbd84ec73dbb85c87b1a4d3eae24aa2825a6bde1762ba3fe0ab0
|
|
| MD5 |
a457f129c39776dc6c4632212720c1a3
|
|
| BLAKE2b-256 |
16662add83dadb8a30147264fe17fcefbc57f7710bf4d78ebc574abce1cdd81a
|
Provenance
The following attestation bundles were made for webex_byods_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on WebexCommunity/webex-python-byods-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webex_byods_sdk-0.2.0-py3-none-any.whl -
Subject digest:
c27d2dfad367dbd84ec73dbb85c87b1a4d3eae24aa2825a6bde1762ba3fe0ab0 - Sigstore transparency entry: 2138919979
- Sigstore integration time:
-
Permalink:
WebexCommunity/webex-python-byods-sdk@9dbc60820aca976f74d43cba6bd75e9b023c8231 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/WebexCommunity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9dbc60820aca976f74d43cba6bd75e9b023c8231 -
Trigger Event:
release
-
Statement type: