Skip to main content
Use the Python SDK to interact with Circle’s User-Controlled Wallet APIs, which allow you to embed secure wallets in your applications and create blockchain transactions using the Developer Services platform. This page provides short examples of how to install and use the user-controlled wallets SDK. For complete examples, see the Sample Projects page. For more information see the user-controlled wallets documentation.
Pydantic v2 upgradeStarting from major version 9, the Python SDK uses Pydantic v2. This change brings performance improvements, enhanced features, and bug fixes.If you are already using the SDK, and choose to upgrade to major version 9, you may need to make some changes to your code.For more information, see Server-side SDK Pydantic v2 upgrade.

Prerequisites

To use the Python SDK, ensure you have: Although not a requirement for using the SDK, Circle recommends that you use a virtual environment for development. A Python virtual environment is an isolated environment that you can use to silo your project from the global Python environment.

Install the SDK

Use the following command to install the SDK with pip:

User-controlled wallets client

To start using the SDK, you first need to configure a client and initialize it with your API key.

Import the client

The following example shows how to import the client and configure it to use your API key:

Create a transaction

The following example shows how to create a transaction using the client:

Client configuration options

The client for the user-controlled wallets SDK accepts the following configuration parameters: