Turnkey SDK Types
Generated type definitions for the Turnkey API based on the OpenAPI specification.
Why Pydantic?
This package uses Pydantic models to handle field name conflicts with Python keywords. For example, some Turnkey API requests include a from field (like v1EthSendTransactionIntent), which is a reserved keyword in Python.
Pydantic's Field aliasing allows us to:
- Use
from_in Python code (avoiding syntax errors) - Automatically serialize to
fromwhen making API requests to Turnkey
class v1EthSendTransactionIntent(TurnkeyBaseModel):
from_: str = Field(alias="from")
# ... other fields
Installation
pip install -e .
Or install from the repository root:
pip install -e packages/sdk-types
Usage
from turnkey_sdk_types import (
# Generated types will be available here
# Example: CreateApiKeyRequest, CreateApiKeyResponse, etc.
)
Code Generation
This package uses code generation to create type definitions from the OpenAPI specification located in schema/public_api.swagger.json.
Generate Types
To regenerate the types:
cd packages/sdk-types
python scripts/generate.py
Development Setup
Install with dev dependencies to access code generation tools:
pip install -e ".[dev]"
Structure
sdk-types/
├── src/
│ └── turnkey_sdk_types/
│ ├── __init__.py # Package exports
│ ├── types.py # RequestType, SignedRequest (not generated)
│ ├── errors.py # TurnkeyError, TurnkeyNetworkError (not generated)
│ └── generated/ # Auto-generated from OpenAPI spec
│ └── types.py
├── scripts/
│ └── generate.py # Code generation script
├── pyproject.toml
└── README.md
Requirements
- Python >= 3.8
Development
Generated Types
The types in generated/types.py are automatically created from the OpenAPI specification at schema/public_api.swagger.json. These include all request/response models like v1EthSendTransactionIntent, CreateWalletBody, etc.
Important: Never edit files in src/turnkey_sdk_types/generated/ manually. They will be overwritten on the next generation run.
Non-Generated Types
Files outside the generated/ directory are maintained as part of the SDK and are not auto-generated:
types.py- Core SDK types likeRequestType,SignedRequesterrors.py- Error classes likeTurnkeyError,TurnkeyNetworkError
Release files for turnkey-sdk-types 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turnkey_sdk_types-0.1.0.tar.gz | 49.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turnkey_sdk_types-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.7 kB
Release files / turnkey_sdk_types-0.1.0.tar.gz
| Download URL | turnkey_sdk_types-0.1.0.tar.gz |
|---|---|
| Size | 49.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f02217aad659f0d21ef0f8aff0451179d667e5fde783f55ba4be07ed6b8cea1e
|
|
BLAKE2b-256 checksum How to use checksums |
d8ba5cd93b7f9eae2cc5f710cd52c8fa16dc8e668461a9a8c3e2256be754c88a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logRelease files / turnkey_sdk_types-0.1.0-py3-none-any.whl
| Download URL | turnkey_sdk_types-0.1.0-py3-none-any.whl |
|---|---|
| Size | 47.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7ee0ecf6cc2ca0902db526aca9b791c9133dd6020c44ce3fc7b44ceb35c83f9
|
|
BLAKE2b-256 checksum How to use checksums |
3982772c1560f520f1369904e5a225b8061afafd7bfb1ebe373818ac5e443a38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency log