Skip to main content

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 from when 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 like RequestType, SignedRequest
  • errors.py - Error classes like TurnkeyError, TurnkeyNetworkError

Metadata

Release files for turnkey-sdk-types 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for turnkey-sdk-types 0.2.1
File Size Uploaded Provenance Actions
turnkey_sdk_types-0.2.1.tar.gz 88.4 kB With provenance Details for turnkey_sdk_types-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for turnkey-sdk-types 0.2.1
File Interpreter ABI Platform Actions
turnkey_sdk_types-0.2.1-py3-none-any.whl Python 3 none any Details for turnkey_sdk_types-0.2.1-py3-none-any.whl

Total release size: 175.5 kB

Release files / turnkey_sdk_types-0.2.1.tar.gz

Download URL turnkey_sdk_types-0.2.1.tar.gz
Size 88.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e869d18302aef81d324810c20839dd1a2f9c5fd9bdf3f582c9cb45b38c6d6afa
BLAKE2b-256 checksum
How to use checksums
11decf64c33302a0ee7fd84debfb188abf34f343e1592ace5cbe773d93c3ce47
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 Oct 21, 2026.

Transparency log

Release files / turnkey_sdk_types-0.2.1-py3-none-any.whl

Download URL turnkey_sdk_types-0.2.1-py3-none-any.whl
Size 87.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f988e899c91be6ba352d493d98ed5979d3fb59169c65d74326d0efc8fe322ac
BLAKE2b-256 checksum
How to use checksums
41b3979a65860e2a080791cb21629d66466f143216c9cfb9c7e1e0c11a54a316
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 Oct 21, 2026.

Transparency log

Security for turnkey-sdk-types 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for turnkey_sdk_types-0.2.1.tar.gz

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 Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page