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

Uploaded Source

File details

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

File metadata

  • Download URL: circle_web3_sdk_util-9.6.0.tar.gz
  • Upload date:
  • Size: 740.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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.6.0.tar.gz
Algorithm Hash digest
SHA256 10b003f36521b68d3f172a3236d50227a4e20ea1d8a6888c5c9d205beea34777
MD5 bbae262312c5bdbc89bd5321ffe313cb
BLAKE2b-256 706d08d58377b845757427666c4fc9727aceb01843b0dd4cd76a7db5667530da

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