Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Metadata

Release files for circle-sdk 0.1.0b5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for circle-sdk 0.1.0b5
File Size Uploaded
circle-sdk-0.1.0b5.tar.gz 201.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for circle-sdk 0.1.0b5
File Interpreter ABI Platform
circle_sdk-0.1.0b5-py3-none-any.whl Python 3 none any Details

Total release size: 869.6 kB

Release files / circle-sdk-0.1.0b5.tar.gz

Download URL circle-sdk-0.1.0b5.tar.gz
Size 201.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c85085cc289a764a6e02198da7560a48d3630477392126f9acb0fceeada1e29b
BLAKE2b-256 checksum
How to use checksums
4ee21523cbf5ed8fa0551cf5a8648fa54caeea1f2dd7ed1a7d5155bf371e7f68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / circle_sdk-0.1.0b5-py3-none-any.whl

Download URL circle_sdk-0.1.0b5-py3-none-any.whl
Size 668.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
714a5e15e341f3368b6f3964e0a3b796174b81f9a5c8ae53fd8e2b168232a3a8
BLAKE2b-256 checksum
How to use checksums
f37af8f05cd08b1d7dc8289760f0abe93bcee1f7b28f85aadeb2291d8ea06ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page