Get started
SDKs
Official clients for Python and for TypeScript and JavaScript. They cover the whole API, retry safely, verify webhooks and raise typed errors. You can also call the HTTP API directly from anything that can send a request.
Installing#
Both SDKs are published to the public registries: the Python SDK on PyPI as exportflow, and the TypeScript SDK on npm as @meertech/exportflow-sdk.
pip install exportflowThe console’s SDKs and keys page lists the current versions. Pin the version in your project so that a build does not change under you.
Versions#
| SDK | Package | Version | API | Runs on | Dependencies |
|---|---|---|---|---|---|
| Python | exportflow | 1.1.0 | 1.x | Python 3.9 or later | httpx |
| TypeScript and JavaScript | @meertech/exportflow-sdk | 1.1.0 | 1.x | Node.js 18 or later, ESM | None |
Both follow semantic versioning and speak version 1 of the API. Release notes are in the changelog, and each package carries its own CHANGELOG.md.
An SDK identifies itself on every request (for example exportflow-python/1.1.0), which is how the console can show which SDK versions each of your applications is using.
Creating a client#
Pass the key, or set EXPORTFLOW_API_KEY and pass nothing. The client is safe to share: create one and reuse it.
from exportflow import ExportFlow
client = ExportFlow(api_key="exfk_test_...") # or set EXPORTFLOW_API_KEY
identity = client.me()
print(identity.organisation_name, identity.environment) # ... sandboxAn API key must never be shipped to a browser or a mobile app. Use the SDKs from your server, and have your own front end call your server.
Configuration#
ExportFlow(
api_key=None, # default: EXPORTFLOW_API_KEY
base_url=None, # default: EXPORTFLOW_BASE_URL or https://api.exportflow.app
timeout=60.0, # seconds per response
max_retries=2,
http_client=None, # your own httpx.Client: proxies, TLS, tests
)| Option | Default | What it does |
|---|---|---|
| API key | EXPORTFLOW_API_KEY | The key to authenticate with. Its prefix selects the environment. |
| Base URL | EXPORTFLOW_BASE_URL | The API's address. Change it only for a private deployment. |
| Timeout | 60 seconds | How long to wait for one response. Seconds in Python, milliseconds in TypeScript. |
| Maximum retries | 2 | How many times a request is sent again after a connection failure, a timeout, rate_limited or a 5xx. 0 disables retries. |
| HTTP client | Built in | Your own httpx.Client (Python) or fetch (TypeScript), for a proxy, custom TLS or tests. |
In Python the client is safe to share between threads; use it as a context manager, or call close(), to release its connections.
What the SDKs do for you#
- Idempotency. Every request that changes something carries a key, and a retry sends the same key and the same body. See Idempotency.
- Retries. Connection failures, timeouts,
rate_limitedand5xxare retried with backoff, honouringRetry-After. - Waiting.
documents.waitandverifications.waitpoll until the work has finished, with a timeout. - Typed errors. Each failure is an error type you can catch, carrying the API’s code. See Errors.
- Webhooks. One call verifies a delivery’s signature and returns the event. See Webhooks.
- Uploads. A file’s type is detected from its content, and the multipart request is built for you.
Without an SDK#
Everything the SDKs do is ordinary HTTP. Send Authorization: Bearer with your key, add an Idempotency-Key to every request that changes something, and handle 429 and 5xx by retrying. Every sample in this documentation has a curl tab, and the API reference describes every endpoint.