Skip to main content
Use the Python SDK to interact with Smart Contract Platform APIs, which allow you interact with smart contracts on the blockchain using the Developer Services platform. This page provides short examples of how to install and use the Smart Contract Platform SDK. For complete examples, see the Sample Projects page. For more information see the Smart Contract Platform documentation.

Prerequisites

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:
Shell

Smart Contract Platform client

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

Import the client

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

Import a smart contract

The following example shows how to import a smart contract using the client:
Python

Client configuration options

The client for the Smart Contract Platform SDK accepts the following configuration parameters: