Skip to main content

Python SDK for Circle APIs

Project description

Circle APIs Python Library

pypi 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

# Configure global settings
circle.base_url = circle.Environment.SANDBOX_BASE_URL
circle.api_key = '<replace-me-with-your-api-key>'

# Choose API driver
api_instance = subscriptions_api.SubscriptionsApi()

# Prepare request data
body = SubscriptionRequest(
    endpoint="https://example.org/py/notifications"
)

# Send request
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 command to generate the source code for thi s SDK from the .openapi-generator/sdk.json OpenAPI specificat ion file:

    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.0b7.tar.gz (178.6 kB view details)

Uploaded Source

Built Distribution

circle_sdk-0.1.0b7-py3-none-any.whl (561.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for circle-sdk-0.1.0b7.tar.gz
Algorithm Hash digest
SHA256 9f69ac0df6d097aa865194d4b34686cf84e38ebcd297cefab0dcd3024ed70324
MD5 1b598fdc9f2d2f25495a3f0e62432ba5
BLAKE2b-256 3d08cf498dcf216d919c040a43cb4b9611e0e760bfb634a680285bab95ef440f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for circle_sdk-0.1.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 85e6f416dc814fd6acec389b5b802a19cf2fea1958cecd0a6553051e751ebaa1
MD5 5f496a9b1eb1826d6db61e28263e4c36
BLAKE2b-256 e42cfdab41b21d915e3434eb5bd5ca76c700bac399e739e884e7a0f86997f026

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