Languages
Python
The Python SDK publishes to PyPI and is async-first, with optional synchronous variants.
Install
pip install your-org-api-clientOptions
| Option | Values | Default |
|---|---|---|
| Data model | dataclass, pydantic, typeddict | dataclass |
| Sync methods | omit, include | omit |
| Client style | functions, namespaced, class, class-namespaced | functions |
| Argument style | object, positional | object |
| Namespace | tags, path | tags |
| Doc comments | full, minimal | full |
| File header | omit, include | omit |
| Usage example | full, concise | full |
Data model
How response models are represented. This is the choice your users feel most.
@dataclass
class User:
id: strStandard library, no dependencies, no runtime validation. The default.
Runtime validation catches spec drift at the boundary instead of three frames deep. But it's a dependency and a performance cost your users didn't choose. If your consumers are FastAPI shops, pydantic is free. Otherwise the standard library is the polite default.
Sync methods
The generated client is async. include emits synchronous variants alongside, for scripts and notebooks where an event loop is friction.
users = client.users.list_sync(limit=10)Package name
PyPI names are global and normalised: underscores and hyphens are treated the same, case is ignored. Acme_API and acme-api are the same project.
acme-api distribution name (pip install acme-api)
acme_api import name (import acme_api)Deleting a release does not free its version number. 1.0.0 published once is 1.0.0 forever. See Publishing.
What callers write
from acme import AcmeClient
client = AcmeClient(token=os.environ["ACME_TOKEN"])
async for user in client.users.list(limit=100):
print(user.id)