Skip to main content

Python SDK for Circle APIs

Project description

Circle APIs Python Library

pypi

The Circle Python library provides convenient access to the Circle API for applications written in Python. For the API reference, see the Circle API docs. Also see this project's PyPI package page.

Requirements

Python 3.7+ and Node 10+ (optional for contributing and development).

Installation

The recommended way of installation is using the Python Package Index (PyPI):

python3 -m pip install circle-sdk

The other option requires you to clone this repo and run

python3 -m pip install -e /Path/to/this/repo/root

Python Typing

We strongly recommended that you use this SDK with Python typing extensions: we recommend using the VS Code IDE, downloading the Python IntelliSense extension, and enabling type checking for your workspace (see this guide).

Usage

import circle
from circle.apis.tags import subscriptions_api
from circle.model.subscription_request import SubscriptionRequest
from pprint import pprint


configuration = circle.Configuration(
    host = "https://api-sandbox.circle.com",
    access_token = '<replace-me-with-your-api-key>'
)


with circle.ApiClient(configuration) as api_client:

    api_instance = subscriptions_api.SubscriptionsApi(api_client)

    body = SubscriptionRequest(
        endpoint="https://example.org/py/notifications"
    )
    
    try:
        api_response = api_instance.create_subscription(body=body)
        pprint(api_response)
    except circle.ApiException as e:
        print("Exception when calling SubscriptionsApi->create_subscription: %s\n" % e)

Development

Clone this repo and install development dependencies using

# For codegen tools and git hook checks
yarn install

# For the Python SDK's dependencies
python3 -m pip install -r requirements.txt
  1. Run the codegen:

    yarn gen-sdk
    

Contributions

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

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-sdk-0.1.0b3.tar.gz (204.1 kB view details)

Uploaded Source

Built Distribution

circle_sdk-0.1.0b3-py3-none-any.whl (760.2 kB view details)

Uploaded Python 3

File details

Details for the file circle-sdk-0.1.0b3.tar.gz.

File metadata

  • Download URL: circle-sdk-0.1.0b3.tar.gz
  • Upload date:
  • Size: 204.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for circle-sdk-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 89e51494f0fd5aa672d77e58642833ecf30d80692b97ba5e8104fecec5791d63
MD5 2014f26cc3a56078d6d6fe3dca37f9d9
BLAKE2b-256 ec92f8c750eb6dc25a5c1c1c08c7121eabe291025f9fd7d49f1de4a64dc9ca7c

See more details on using hashes here.

File details

Details for the file circle_sdk-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: circle_sdk-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 760.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for circle_sdk-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 28544ab0869c879d8d94c95474644cabf24934e524937f4bb8ba4d2231440ea2
MD5 67df37a8fc526ebf5ddc4146f07eac92
BLAKE2b-256 20b4540cf9606de7bcd28bf724fb8eaf6bef79930cad16998e3697f797dd66fc

See more details on using hashes here.

Supported by

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