Skip to main content

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_id is fixed at construction; every path is built from it (Client._tenant_path). No API targets another tenant. The service still re-enforces require_tenant_match (defense in depth).
  • Typed errors. HTTP status → AuthError/PermissionError_/NotFoundError/QuotaError/ServiceError.
  • Honest surfaces. Not-yet-implemented capabilities raise NotImplementedYet with 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


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.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datanature_sdk-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file datanature_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: datanature_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datanature_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2e9bde6c3c0da803852ee39be077f8d5c5db05eaacb18712a7c67d0a61d17df
MD5 dfbe5d05759c5def3cb72e1b578dfa75
BLAKE2b-256 2b9edfb45d7c2539ef1ca0c5cbc75b22d33bd89911fdb9a82f3220c37e1b9a25

See more details on using hashes here.

Provenance

The following attestation bundles were made for datanature_sdk-0.1.0.tar.gz:

Publisher: sdk-publish.yml on dlytica-gcp/datanature-paas-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datanature_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: datanature_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datanature_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49bf46dd3823136397e1d695cb645d8f6144a8e1c50d4d77a7720ae482c9781a
MD5 72ff25c18ccc7d4d637374c39cad2ef3
BLAKE2b-256 cd0deb8f1fb3985bbf1e4d5121820a50ac8de47adefa81ef7eb6e2029029ea3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for datanature_sdk-0.1.0-py3-none-any.whl:

Publisher: sdk-publish.yml on dlytica-gcp/datanature-paas-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page