DataNature DS/DE SDK — tenant-safe client for the sdk-layer service.
Project description
datanature-sdk (Python)
Tenant-safe DS/DE client for the DataNature sdk-layer service. Marketplace artifact
(Track B). Full design: docs/sdk/SDK-PLAN.md; usage:
docs/sdk/SDK-USE-CASES.md.
from datanature import Client
# machine / notebook / CI
c = Client("https://sdk.platform.dlytica.com", workspace_id="09588140-...",
api_key="vmk_09588140_...")
# or interactive session token
c = Client.login("https://sdk.platform.dlytica.com", workspace_id="09588140-...",
token="<platform session token>")
c.version() # sdk-layer API version
c.capabilities() # DS/DE surfaces this workspace's plan entitles
c.de.query.run(...) # DE surfaces (SDK-06..09) — land per bead
c.ds.spark.session() # DS surfaces (SDK-10) — land per bead
Design guarantees
- One
Client== one workspace.workspace_idis fixed at construction; every path is built from it (Client._tenant_path). No API targets another tenant. The service still re-enforcesrequire_tenant_match(defense in depth). - Typed errors. HTTP status →
AuthError/PermissionError_/NotFoundError/QuotaError/ServiceError. - Honest surfaces. Not-yet-implemented capabilities raise
NotImplementedYetwith their tracking bead — never fake behavior. - Resilient transport. Idempotent GETs retry on 429/5xx with capped backoff.
Layout
datanature/
client.py Client + tenant-safety core (SDK-05)
auth.py SessionTokenAuth / ApiKeyAuth (SDK-04)
transport.py httpx wrapper: retries, pagination, error mapping (SDK-03)
errors.py typed error hierarchy
de/ ds/ governance/ capability namespaces (surfaces land per bead)
tests/ offline tests via httpx.MockTransport
Develop
cd sdk/python
pip install -e ".[dev]"
PYTHONPATH=. pytest tests/ -q
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
datanature_sdk-0.2.0.tar.gz
(19.9 kB
view details)
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 datanature_sdk-0.2.0.tar.gz.
File metadata
- Download URL: datanature_sdk-0.2.0.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe196e4ef17e38bb9e0caa22997faf86631ece444029d140aec390038fc05d93
|
|
| MD5 |
80e639e3387f90ddc72e84085cf16105
|
|
| BLAKE2b-256 |
4178e31991301ea14913cf59de1bf5bac17999aab5a5baa9039c08abdc654801
|
File details
Details for the file datanature_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: datanature_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44da35bc31929e8cb2e145df966ac7635514e4c9bae6e6bc3929ef03a6fc381d
|
|
| MD5 |
a140ebb1158850556dfbabf37f93196d
|
|
| BLAKE2b-256 |
3d76c76e630b8ceb6733c5830b926cef067383f5266525183d5803ef05b4439d
|