Python SDK for Circle.so - Admin V2, Headless Auth, and Headless Client V1 APIs
Project description
circle-so-python-sdk
Python SDK for Circle.so covering three APIs:
- Headless Auth API -- token management for headless integrations
- Admin API V2 -- server-side community management (~120 endpoints)
- Headless Client API V1 -- member-facing operations (~100 endpoints)
Installation
pip install circle-so-python-sdk
Quick Start
from circle import CircleClient
# Admin API usage
client = CircleClient(api_token="YOUR_ADMIN_TOKEN")
community = client.admin.get_community()
# Headless Auth -- get member tokens
token = client.auth.create_auth_token(email="member@example.com")
# Headless Client -- use member access token
headless = CircleClient(api_token=token.access_token, community_url="https://your-community.circle.so")
spaces = headless.headless.list_spaces()
Async Support
from circle import AsyncCircleClient
async with AsyncCircleClient(api_token="YOUR_TOKEN") as client:
members = await client.admin.list_community_members()
API Coverage
| API | Endpoints | Sync | Async |
|---|---|---|---|
| Headless Auth | 4 | Yes | Yes |
| Admin V2 | ~118 | Yes | Yes |
| Headless Client V1 | ~101 | Yes | Yes |
Documentation
- Quickstart -- install, auth, basic usage
- Admin API -- all admin endpoints with examples
- Headless API -- all headless endpoints with examples
- Auth API -- headless auth token management
- Models -- complete models reference
- Webhooks -- signature verification and payload parsing
- Limitations -- known Circle API limitations (mentions, polls, moderators)
Project Structure
src/circle/
__init__.py # Public API exports
client.py # CircleClient / AsyncCircleClient facade
http.py # Sync/Async HTTP transport with retry
exceptions.py # Typed exceptions (401/403/404/422/429)
pagination.py # Auto-pagination helpers
rate_limit.py # Token bucket rate limiter
validation.py # Request body validation models
webhooks.py # Webhook signature verification
models/
auth.py # HeadlessAuthToken, RefreshedAccessToken
admin/ # ~35 Pydantic models for Admin API
headless/ # ~40 Pydantic models for Headless API
api/
auth.py # Headless Auth client (4 endpoints)
admin_*.py # 8 Admin API client modules
headless_*.py # 3 Headless API client modules
Contributing
- Clone the repo and install in dev mode:
pip install -e .[dev] - Run tests:
pytest tests/ -v --ignore=tests/integration - Follow conventional commit format for commit messages
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file circle_so_python_sdk-0.1.2.tar.gz.
File metadata
- Download URL: circle_so_python_sdk-0.1.2.tar.gz
- Upload date:
- Size: 46.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc7779e3d73589ebb9c7edcb907331f475018d926dd3c7cf41d8462104a08f6
|
|
| MD5 |
e15d17f5b1d28e224ae33d8650aa0ac2
|
|
| BLAKE2b-256 |
6634ad1e683069a8e55006dcc5d567ddfbfbf058ba27209cc8d41a400fcddba1
|
File details
Details for the file circle_so_python_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: circle_so_python_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 49.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1ef115c4246964a38ba3506290443e3acd485615e13d53baf9e54288fefacb2
|
|
| MD5 |
da589e49535a9e7d6ea97749bb3ec5c1
|
|
| BLAKE2b-256 |
b682ba0584677393c9717f5e818494a3e42c41238638b0cecb99134a1c199251
|