ExportFlowDevelopers
Sign inGet API keys

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 exportflow

The 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#

Current SDK versions
SDKPackageVersionAPIRuns onDependencies
Pythonexportflow1.1.01.xPython 3.9 or laterhttpx
TypeScript and JavaScript@meertech/exportflow-sdk1.1.01.xNode.js 18 or later, ESMNone

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)   # ... sandbox
Server side only

An 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
)
Client options
OptionDefaultWhat it does
API keyEXPORTFLOW_API_KEYThe key to authenticate with. Its prefix selects the environment.
Base URLEXPORTFLOW_BASE_URLThe API's address. Change it only for a private deployment.
Timeout60 secondsHow long to wait for one response. Seconds in Python, milliseconds in TypeScript.
Maximum retries2How many times a request is sent again after a connection failure, a timeout, rate_limited or a 5xx. 0 disables retries.
HTTP clientBuilt inYour 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_limited and 5xx are retried with backoff, honouring Retry-After.
  • Waiting. documents.wait and verifications.wait poll 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.