Skip to main content

The Python SDK Utility for Circle Web3 Services

Project description

Circle Web3 APIs Python SDK

The Circle Web3 Python SDK provides convenient access to the Circle Web3 APIs for applications written in Python. For the API reference, see the Circle Web3 API Docs.

PyPI packages:

Requirements

Python 3.10+.

Installation

Install one or more of the SDK packages from PyPI:

pip install circle-developer-controlled-wallets
pip install circle-smart-contract-platform
pip install circle-user-controlled-wallets

Usage

Secure your API key and entity secret by setting them as environment variables. See the entity secret management guide for details.

export CIRCLE_WEB3_API_KEY="Your API KEY"
export CIRCLE_ENTITY_SECRET="Your entity secret"

Initialize the clients:

from circle.web3 import utils

dcw_client = utils.init_developer_controlled_wallets_client(api_key="Your API KEY", entity_secret="Your entity secret")
scp_client = utils.init_smart_contract_platform_client(api_key="Your API KEY", entity_secret="Your entity secret")
ucw_client = utils.init_user_controlled_wallets_client(api_key="Your API KEY")

Make a request:

from circle.web3 import user_controlled_wallets, utils

ucw_client = utils.init_user_controlled_wallets_client(api_key="<your-api-key>")

api_instance = user_controlled_wallets.PINAuthenticationApi(ucw_client)
try:
    api_request = user_controlled_wallets.UserTokenRequest.from_dict({"userId": "test-user"})
    api_response = api_instance.get_user_token(api_request)
    print(api_response.data.user_token)
except user_controlled_wallets.ApiException as e:
    print("Exception when calling PINAuthenticationApi->get_user_token: %s\n" % e)

Development and contributing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circle_web3_sdk_util-9.3.2.tar.gz (743.8 kB view details)

Uploaded Source

File details

Details for the file circle_web3_sdk_util-9.3.2.tar.gz.

File metadata

  • Download URL: circle_web3_sdk_util-9.3.2.tar.gz
  • Upload date:
  • Size: 743.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for circle_web3_sdk_util-9.3.2.tar.gz
Algorithm Hash digest
SHA256 6e8e59be1502c3a8a02e7fc6aabfe223467b3341228966c5a6798f554d2799c9
MD5 cdcfbc58ec58b5342848181045ee8101
BLAKE2b-256 a2ea9c2169fe023c72126287358598b9a4f27f5338878316f1f75cefcaf50a3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page