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.4.1.tar.gz (763.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: circle_web3_sdk_util-9.4.1.tar.gz
  • Upload date:
  • Size: 763.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.4.1.tar.gz
Algorithm Hash digest
SHA256 cf1c2b0bdf34ed7c0523822360078d2181f35944e434b3b45a80f478c68453c8
MD5 8af4072096fb769dbdc2d33afb5a58a4
BLAKE2b-256 0cc69376325f1ec18a03598ff8132cb5e26c0a429bb7313572a9a087a9163380

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