circle-web3-sdk-util


Namecircle-web3-sdk-util JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/circlefin/circle-web3-python-sdk
SummaryThe Python SDK Utility for Circle Web3 Services
upload_time2024-06-14 15:23:38
maintainerNone
docs_urlNone
authorCircle Technology Inc
requires_python<4,>=3.7
licenseMIT License
keywords circle web3 python developer controlled wallets user controlled wallets smart contract platform
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://developers.circle.com/w3s/reference/getping). 
Also see this project's [PyPI Package Page [TODO]]().

## Requirements

Python 3.7+.

Java 11 and Node 10+ (optional for contributing and development).

## Installation

The recommended way of installation is using the Python Package Index (PyPI):
```sh
pip install circle-developer-controlled-wallets
pip install circle-smart-contract-platform
pip install circle-user-controlled-wallets
```

## Development
Clone this repo and install development dependencies using

```sh
# For codegen tools and git hook checks
yarn install
```

Run the codegen command to generate the source code for this SDK from 
the `w3s-openapi-internal` OpenAPI specifications
```sh
# Executes .openapi-generator/gen-sdk.sh
yarn gen-sdk
```

## Usage

Initialize circle web3 API clients. To secure your entity secret and circle API key. Set the API key and entity secret as environment variables. Learn more about entity secret management [here](https://developers.circle.com/w3s/docs/entity-secret-management)

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

```python
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")
```

Using client to make a transaction.

```python
from circle.web3 import user_controlled_wallets

# create a API instance
api_instance = user_controlled_wallets.UsersAndPinsApi(ucw_client)
try:
    api_request = user_controlled_wallets.GenerateUserTokenRequest.from_dict({"userId": "User ID"})
    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 UsersAndPinsApi->get_user_token: %s\n" % e)
```

## Contributions

Please follow the [Conventional Commits][convencomms] format for all commits when creating a contributing pull request for this repo.

[convencomms]: https://www.conventionalcommits.org/en/v1.0.0/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/circlefin/circle-web3-python-sdk",
    "name": "circle-web3-sdk-util",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": null,
    "keywords": "Circle, Web3, Python, Developer Controlled Wallets, User Controlled Wallets, Smart Contract Platform",
    "author": "Circle Technology Inc",
    "author_email": "bohan.li@circle.com",
    "download_url": "https://files.pythonhosted.org/packages/24/5a/b32adab12d3a728831751f2ea35e0d237f248984ce90b80fdeb490fbd923/circle_web3_sdk_util-1.1.1.tar.gz",
    "platform": null,
    "description": "# Circle Web3 APIs Python SDK\n\nThe Circle Web3 Python SDK provides convenient access to the Circle Web3 APIs for\napplications written in Python. For the API reference, see the [Circle Web3 API Docs](https://developers.circle.com/w3s/reference/getping). \nAlso see this project's [PyPI Package Page [TODO]]().\n\n## Requirements\n\nPython 3.7+.\n\nJava 11 and Node 10+ (optional for contributing and development).\n\n## Installation\n\nThe recommended way of installation is using the Python Package Index (PyPI):\n```sh\npip install circle-developer-controlled-wallets\npip install circle-smart-contract-platform\npip install circle-user-controlled-wallets\n```\n\n## Development\nClone this repo and install development dependencies using\n\n```sh\n# For codegen tools and git hook checks\nyarn install\n```\n\nRun the codegen command to generate the source code for this SDK from \nthe `w3s-openapi-internal` OpenAPI specifications\n```sh\n# Executes .openapi-generator/gen-sdk.sh\nyarn gen-sdk\n```\n\n## Usage\n\nInitialize circle web3 API clients. To secure your entity secret and circle API key. Set the API key and entity secret as environment variables. Learn more about entity secret management [here](https://developers.circle.com/w3s/docs/entity-secret-management)\n\n```shell\nexport CIRCLE_ENTITY_SECRET=\"Your entity secret\"\nexport CIRCLE_WEB3_API_KEY=\"Your API KEY\"\n```\n\n```python\nfrom circle.web3 import utils\n\ndcw_client = utils.init_developer_controlled_wallets_client(api_key=\"Your API KEY\", entity_secret=\"Your entity secret\")\nscp_client = utils.init_smart_contract_platform_client(api_key=\"Your API KEY\", entity_secret=\"Your entity secret\")\nucw_client = utils.init_user_controlled_wallets_client(api_key=\"Your API KEY\")\n```\n\nUsing client to make a transaction.\n\n```python\nfrom circle.web3 import user_controlled_wallets\n\n# create a API instance\napi_instance = user_controlled_wallets.UsersAndPinsApi(ucw_client)\ntry:\n    api_request = user_controlled_wallets.GenerateUserTokenRequest.from_dict({\"userId\": \"User ID\"})\n    api_response = api_instance.get_user_token(api_request)\n    print(api_response.data.user_token)\nexcept user_controlled_wallets.ApiException as e:\n    print(\"Exception when calling UsersAndPinsApi->get_user_token: %s\\n\" % e)\n```\n\n## Contributions\n\nPlease follow the [Conventional Commits][convencomms] format for all commits when creating a contributing pull request for this repo.\n\n[convencomms]: https://www.conventionalcommits.org/en/v1.0.0/\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "The Python SDK Utility for Circle Web3 Services",
    "version": "1.1.1",
    "project_urls": {
        "Developer Doc": "https://developers.circle.com/w3s/",
        "Homepage": "https://github.com/circlefin/circle-web3-python-sdk",
        "Source": "https://github.com/circlefin/circle-web3-python-sdk"
    },
    "split_keywords": [
        "circle",
        " web3",
        " python",
        " developer controlled wallets",
        " user controlled wallets",
        " smart contract platform"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c46dacc83fa3c47bbfe9960ab514a6d0f74f43825479e0d09a3f806df5d022f",
                "md5": "4b18dcb2595327d6b581b571e6ea2a48",
                "sha256": "0805f634e9d978c0a253153ce7cf04b4f0df40423fdcd199b8db997787b9e6ac"
            },
            "downloads": -1,
            "filename": "circle_web3_sdk_util-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b18dcb2595327d6b581b571e6ea2a48",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 7512,
            "upload_time": "2024-06-14T15:23:37",
            "upload_time_iso_8601": "2024-06-14T15:23:37.326373Z",
            "url": "https://files.pythonhosted.org/packages/2c/46/dacc83fa3c47bbfe9960ab514a6d0f74f43825479e0d09a3f806df5d022f/circle_web3_sdk_util-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "245ab32adab12d3a728831751f2ea35e0d237f248984ce90b80fdeb490fbd923",
                "md5": "4742cb081a9ed10a55cc617263c8820d",
                "sha256": "cb80895c603243b0e20d0ca7f5290246e27fd171d453f05edf70212f4225720a"
            },
            "downloads": -1,
            "filename": "circle_web3_sdk_util-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4742cb081a9ed10a55cc617263c8820d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 7040,
            "upload_time": "2024-06-14T15:23:38",
            "upload_time_iso_8601": "2024-06-14T15:23:38.868119Z",
            "url": "https://files.pythonhosted.org/packages/24/5a/b32adab12d3a728831751f2ea35e0d237f248984ce90b80fdeb490fbd923/circle_web3_sdk_util-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-14 15:23:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "circlefin",
    "github_project": "circle-web3-python-sdk",
    "github_not_found": true,
    "lcname": "circle-web3-sdk-util"
}
        
Elapsed time: 0.28021s