Skip to main content

Official Python SDK for the equipo.tesote.com API.

Project description

tesote-sdk

Official Python SDK for the equipo.tesote.com API.

  • Zero runtime dependencies. Uses only the Python standard library.
  • Min runtime: Python 3.9.
  • Versioned clients side-by-side: V1Client, V2Client.

Install

pip install tesote-sdk

Usage

from tesote_sdk import V2Client

client = V2Client(api_key="sk_live_...")

for account in client.accounts.list():
    print(account["id"])

Mix versions in the same process when you need to:

from tesote_sdk import V1Client, V2Client

legacy = V1Client(api_key="sk_live_...")
new = V2Client(api_key="sk_live_...")

Auth

Single scheme: bearer API key. Pass it at construction. The SDK never persists the key, never logs it, and redacts it to Bearer <last4> in logs and error summaries.

V*Client(api_key="") raises ConfigError synchronously.

Errors

Every error inherits from TesoteError and carries: error_code, message, http_status, request_id, error_id, retry_after, response_body, request_summary, attempts. __cause__ is preserved when wrapping a lower-level exception.

Catch the narrowest type:

from tesote_sdk import RateLimitExceededError, V2Client

try:
    V2Client(api_key=key).accounts.list()
except RateLimitExceededError as e:
    print(f"slow down for {e.retry_after}s (req {e.request_id})")

Full hierarchy: see docs/architecture/errors.md in the monorepo.

Transport features

Configured at the client; resource modules never reimplement them:

Concern Default
Retries 3 attempts, exp backoff + jitter, base 250ms, cap 8s, retry on 429/502/503/504 + network errors
Timeouts connect 5s, read 30s
Idempotency auto Idempotency-Key UUIDv4 on POST/PUT/PATCH/DELETE
Rate limits client.last_rate_limit after every request
Cache opt-in TTL LRU via cache_ttl= per call; pluggable CacheBackend
Logging optional callback, Authorization always redacted

Polling model (v1, v2)

The platform is poll-based. Use accounts.sync(...) (v2) to trigger a refresh, then poll accounts.get(...) until the data settles.

Versioning

  • API versions (v1, v2) ship side-by-side and never get removed.
  • SDK semver is independent. Tag releases as python-vX.Y.Z.

See CHANGELOG.md.

Development

cd packages/python
pip install -e .[test]
ruff check .
mypy src
pytest

License

MIT.

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

tesote_sdk-0.2.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

tesote_sdk-0.2.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file tesote_sdk-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for tesote_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e59375a8aacd992d2a2c0ea390e58f73e6da8a6a245260fd8251c8f11693447c
MD5 f48813832b224588646c9288f2b0aa59
BLAKE2b-256 7e74ef9928a1887b02f0d5df48f6f3d79c877944478675145cbb3ae9fd15f602

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesote_sdk-0.2.0.tar.gz:

Publisher: python.yml on tesote/sdk

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

File details

Details for the file tesote_sdk-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tesote_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2748fa298a308b7680623115a8f84af9385fba124b94f74e909c039bb5cde695
MD5 1349d475c9578ef79acd0978224ea8dc
BLAKE2b-256 6420ff81d06625d580b4aad35d0db28242cfb9239e5bea23398ed288455301b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesote_sdk-0.2.0-py3-none-any.whl:

Publisher: python.yml on tesote/sdk

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