
For Python developers: this SDK calls our API for you, so you do not build requests by hand. It covers all 256 operations, one method per operation: domains, DNS, SMS, E-mail Center, AI, billing, support, servers and the rest. It is generated from the OpenAPI specification, so it keeps up with the API.
What it does
It gives you a Client with one area per part of the API: domains, dns, sms, email_center, ai and the others. The API address is already in the SDK.
It also handles errors, retries and the Idempotency-Key, and checks webhook signatures.
What you need
Python 3.8 or newer. No dependencies: only the standard library. And an API key, created in the API Center of Meu Interweb.
Installing, step by step
|
|
|
from interweb_ao import Client
client = Client() # or Client(api_key="sandbox_...")
print(client.status.ping_get()["data"]["status"])
If the request comes back without an error, the key and the SDK are working. Sending an SMS, for example, looks like this:
client.sms.messages_create({"number": "+244923123456", "text": "Your order is ready."})
| Complete examples are in the examples/ folder of the repository, and every operation is listed in OPERATIONS.md. |
The API key and its permissions
If the key lacks the permission for an operation, the API answers 403 insufficient_scope. Give the key only the permissions of the areas you use: see permissions by area.
Errors arrive as ApiError, with the HTTP status, the code, the message and the correlation_id. The most common: 401 unauthorized, 402 insufficient_credit and 429 rate_limited.
Testing without spending
Start with a sandbox_ key: it reads your real data, but writes are simulated and never charge. The X-API-Simulated header, in client.last_response, tells you whether a write was simulated.
Good to know
Retries: on 429 and 5xx, the SDK waits and tries again, up to 2 times by default, and follows Retry-After. Where an operation accepts an Idempotency-Key, it creates one itself, so a request is never done twice.
Streaming: in the AI chat, "stream": True gives you an iterator of events.
Webhooks: verify_webhook checks the signature in the X-Webhook-Signature header.
Help
If the API returns an error you do not understand, open a support ticket and send us the correlation_id, never the key. The code is in the Python SDK repository, under the MIT license.
|
Ready to call the API from Python? Download the latest release |
|
SEE ALSO Idempotency-Key: repeating without doing it twice |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from 5.940,00 Kz/mo (3-year plan, with coupon) See plans |











