| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
Until publication, install from a local checkout:
python3 -m pip install -e .from webex_byods import StaticAccessTokenProvider, WebexDataSourceClient
client = WebexDataSourceClient(
token_provider=StaticAccessTokenProvider(service_app_access_token)
)
data_sources = client.list_all_data_sources()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.
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.
python3 -m pip install -e ".[dev]"
python3 -m pytest -q
ruff check .| Back | FazBrowse Home | New Git URL |