Official SDK
Python SDKThe Python client has no third-party runtime dependencies. APIError exposes status, code, message, required_scope and retry_after.
Installation
Example
pip install "as213905 @ git+https://git.datacoria.com/Phylex/as213905-sdk.git@v1.1.0#subdirectory=python"
Complete example
Example
import os
from as213905 import AS213905, APIError

client = AS213905(os.environ["AS213905_API_KEY"])

try:
    traffic = client.traffic(days=7)
    print(f"p95: {traffic['p95_kbps']} kbps")
except APIError as error:
    print(error.status, error.code, error.required_scope)
    raise
Production usage
Credential handling
Read the API key from a secret or environment variable. Reuse one client instance, set request cancellation in your application, and handle 429 responses according to Retry-After.