Python SDK for Circle APIs
Project description
Circle APIs Python Library
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
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file circle-sdk-0.1.0b14.tar.gz
.
File metadata
- Download URL: circle-sdk-0.1.0b14.tar.gz
- Upload date:
- Size: 223.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6074a2f13161eee30a0af61a3c094b3827261ee8efc4a45f15a462377274a351 |
|
MD5 | bb89ec1335171097fdc5ad0db8f8b536 |
|
BLAKE2b-256 | 8c7f02821e4b93af898a395af26a008384fb3c6b533d30983d6703a0da464d74 |
File details
Details for the file circle_sdk-0.1.0b14-py3-none-any.whl
.
File metadata
- Download URL: circle_sdk-0.1.0b14-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226daa179c252280dddfb0f09413d52bf631b83504b053ac69fe86ca265c30f6 |
|
MD5 | 60be63b8e83d5c690b111ead5b5a03d6 |
|
BLAKE2b-256 | 68ee3b57144f023cb30fcaead56d891b9bc5ecf898f910714386988ad0879dd7 |