Imported from voxgig-sdk/apimatic-sdk (
py/AGENTS.md). Install upstream withnpx skills add voxgig-sdk/apimatic-sdk --skill py. Copyright stays with the author.
Apimatic Python — Agent Guide
The Python client for the Apimatic API. This directory is generated — do not edit it by hand; change the model/template/component in .sdk/ and regenerate. See the project guide for the full workflow and the aontu model language.
Paths below (
.sdk/…) are relative to the project root — one level up from thispy/directory.
Regenerate this target
cd ../.sdk
npm run build # only if you changed a component
npm run generate # refreshes this py/ directory
Then build and test the generated output:
# in this target directory (py/):
pip install -e .
make build
make test
What generates this target
| Source | Path | Edit when… |
|---|---|---|
| Target definition | .sdk/model/target/py.aon |
deps, module, extension, phases change |
| Templates | .sdk/tm/py/ |
the file is the same for every API (runtime, transport, base classes) — copied verbatim with placeholder substitution |
| Components | .sdk/src/cmp/py/ |
the file's shape depends on the API (entities, constructor, README, tests) — TypeScript that walks the model |
Decision rule: same for every API → template; depends on the API →
component. After editing a component run npm run build before
npm run generate; template-only edits just need npm run generate.
Features in this target
Each feature is a flat file in the feature/ package. Its hooks and
default activation come from .sdk/model/feature/<name>.aon; customise
the runtime under .sdk/tm/py/feature/ and regenerate.
| Feature | Runtime file | Active hooks |
|---|---|---|
| debug — Request/response capture ring buffer for debugging | feature/debug_feature.py |
PreDone, PreRequest, PreResponse, PreUnexpected |
| idempotency — Idempotency keys for safe retries of mutating operations | feature/idempotency_feature.py |
PreRequest |
| metrics — Statistics capture: per-operation counters and latency | feature/metrics_feature.py |
PreDone, PrePoint, PreUnexpected |
| paging — Pagination signals for list operations | feature/paging_feature.py |
PreRequest, PreResult |
| ratelimit — Client-side rate limiting via a token bucket | feature/ratelimit_feature.py |
— |
| retry — Automatic retry of transient failures with exponential backoff | feature/retry_feature.py |
— |
| test — In-memory mock transport for testing without a live server | feature/test_feature.py |
GetData, GetMatch, PostConstruct, PostConstructEntity, PrePoint, PreRequest, PreResponse, PreResult, PreSpec, SetData, SetMatch |
| timeout — Per-request timeout with transport abort | feature/timeout_feature.py |
— |
Generated by @voxgig/sdkgen. See the project guide.