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.1.0.tar.gz (12.1 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.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tesote_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 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.1.0.tar.gz
Algorithm Hash digest
SHA256 a35a443986ccdbdab50f2b33c32f34cdcbe09721a0245af25a0157d82fd5b8c9
MD5 56160bd25fb12abdebf58b7ab74e30a0
BLAKE2b-256 0dd1db6ade65baaab56e91d47f04a007234f848958e71aae18d5842b6fde3546

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesote_sdk-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: tesote_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c20fef46d26ce625b42a5aa787c922cb05e81b837b8bb8e8e1b44508e338cbf4
MD5 9c3095c7c267565116e2ab02290ca802
BLAKE2b-256 c50d295b9f422ea276aec4f1fbc7618f97a86bf36b2c6f23e2cdd6b60ec1ed89

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesote_sdk-0.1.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