Python SDK for the DX Web and DX Data Cloud APIs
Project description
getdx
Sync-first Python SDK covering both DX APIs:
- DX Web API (
https://api.getdx.com) - DX Data Cloud API (
https://{instance}.getdx.net/api)
This SDK does not cache API responses. Each call fetches fresh data.
Install
pip install getdx
Requires Python 3.10+.
Quickstart
Web API only
from getdx import DXClient, DXWebConfig
with DXClient(web=DXWebConfig(token="<DX_WEB_API_TOKEN>")) as client:
entities = client.web.entities.list(limit=10)
overview = client.web.aggregates.entity_overview("my-entity-id")
print(entities)
print(overview.tasks)
Data Cloud API only
from getdx import DXClient, DXDataCloudConfig
with DXClient(
data_cloud=DXDataCloudConfig(
token="<DX_DATA_CLOUD_TOKEN>",
instance="yourinstance",
)
) as client:
group = client.data_cloud.repo_groups.get(reference_id="frontend-team")
print(group)
Both APIs in one client
from getdx import DXClient, DXDataCloudConfig, DXWebConfig
with DXClient(
web=DXWebConfig(token="<DX_WEB_API_TOKEN>"),
data_cloud=DXDataCloudConfig(token="<DX_DATA_CLOUD_TOKEN>", instance="yourinstance"),
) as client:
web_entity = client.web.entities.info("entity-1")
repo_group = client.data_cloud.repo_groups.get(reference_id="frontend-team")
Data Cloud convenience helpers
client.data_cloud.custom_data.delete_by_id(id)client.data_cloud.custom_data.delete_by_reference_key(reference, key)client.data_cloud.deployments.set_pull_services_by_github_pull_id(...)client.data_cloud.deployments.set_pull_services_by_repo_and_number(...)
Optional namespace behavior
If web or data_cloud was not configured on DXClient, accessing that namespace raises
DXClientNotConfiguredError.
Environment variables
DX_WEB_API_TOKENfor Web API token fallbackDX_DATA_CLOUD_TOKENfor Data Cloud token fallbackDX_DATA_CLOUD_INSTANCEfor Data Cloud instance fallback
Development
Clone and install with uv:
git clone https://github.com/priiiiit/dx-python.git
cd dx-python
uv sync --dev
Regenerate API wrappers
Generated modules live under:
src/getdx/web/(operations.py, services/)src/getdx/data_cloud/(operations.py, services/)
uv run python scripts/generate_from_openapi.py \
--api-name web \
--spec specs/dx_web_api_openapi.json
uv run python scripts/generate_from_openapi.py \
--api-name data_cloud \
--spec specs/dx_data_cloud_api_openapi.json
Testing and linting
uv run ruff format .
uv run ruff check .
uv run pytest
Optional live smoke tests:
RUN_LIVE_DX_TESTS=1 uv run pytest tests/live -q
For Data Cloud live smoke, set:
DX_DATA_CLOUD_TOKENDX_DATA_CLOUD_INSTANCEDX_DATA_CLOUD_TEST_REFERENCE_ID
License
MIT — see 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 getdx-0.1.0.tar.gz.
File metadata
- Download URL: getdx-0.1.0.tar.gz
- Upload date:
- Size: 81.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
785bb3b5e8abcf26ebdde9558622e029bcf8c683132f7bb5c62f3be4bd49e56a
|
|
| MD5 |
fe2f2325eb5096dc13001753cd5e822b
|
|
| BLAKE2b-256 |
b8ff21c975e14438a0f12a0c110cf452e463114b9c1ac578734204f2b4ada46b
|
Provenance
The following attestation bundles were made for getdx-0.1.0.tar.gz:
Publisher:
publish.yml on priiiiit/dx-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getdx-0.1.0.tar.gz -
Subject digest:
785bb3b5e8abcf26ebdde9558622e029bcf8c683132f7bb5c62f3be4bd49e56a - Sigstore transparency entry: 1592078316
- Sigstore integration time:
-
Permalink:
priiiiit/dx-python@41ec4950a8182d52fac5c8f7a9188278c93153ad -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/priiiiit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41ec4950a8182d52fac5c8f7a9188278c93153ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file getdx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getdx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.7 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 |
d8fdf24c94b8a4755c5ca396cc2e231c1f31ddc3aa5edd9af68f89809daff3e9
|
|
| MD5 |
ea582e57fc18c3b991dce1f58c2de86c
|
|
| BLAKE2b-256 |
9982b55ce3e9f95e5caa538b76fec31e9b7f02f50e88bc94a1754783c449d92a
|
Provenance
The following attestation bundles were made for getdx-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on priiiiit/dx-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getdx-0.1.0-py3-none-any.whl -
Subject digest:
d8fdf24c94b8a4755c5ca396cc2e231c1f31ddc3aa5edd9af68f89809daff3e9 - Sigstore transparency entry: 1592078327
- Sigstore integration time:
-
Permalink:
priiiiit/dx-python@41ec4950a8182d52fac5c8f7a9188278c93153ad -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/priiiiit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41ec4950a8182d52fac5c8f7a9188278c93153ad -
Trigger Event:
push
-
Statement type: