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.Documentation Index
Fetch the complete documentation index at: https://circle-devdocs-test-ai-codegen-component.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Have Python installed.
- Have an active Circle Developer Account.
- Generate an API key to use in requests to the Circle API.
- Generate an entity secret to use in requests with the developer-controlled wallets SDK.
Install the SDK
Use the following command to install the SDK with pip:Shell
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:Python
Create a transaction
The following example shows how to create a transaction using the client:Python
Client configuration options
The client for the user-controlled wallets SDK accepts the following configuration parameters:| Option | Required? | Description |
|---|---|---|
api_key | Yes | The API key used to authenticate requests to the Circle API. |
host | No | The base URL that overrides the default API URL of https://api.circle.com/v1/w3s. |
user_agent | No | Custom user agent request header. If provided, it’s added before the default user agent header. |