Python SDK
Python SDK for Sautikit. Install via pip, place calls with client.calls.create(). Preview: pin your version.
The Sautikit Python SDK is a modern async-first client for placing calls, checking call status, and managing phone numbers. It supports both async/await and synchronous calls, and works with Python 3.10+.
pip install sautikitPlace an outbound call and get the call ID back:
import asyncio
from sautikit import SautikitClient
async def main():
client = SautikitClient(api_key="YOUR_API_KEY")
call = await client.calls.create(
from_number="+254712345678",
to=["+254700000001"],
)
print(f"Call placed. ID: {call.call_id}, Status: {call.status}")
asyncio.run(main())The response includes:
{
"call_id": "9d2b1f53-8c0e-4f1d-9a6b-5d3a8c47e9f0",
"pbx_session_id": "HD_1a2b3c",
"status": "ringing",
"events_url": "/v1/calls/9d2b1f53-8c0e-4f1d-9a6b-5d3a8c47e9f0/events"
}For synchronous code, use the blocking client:
from sautikit import SautikitClientSync
client = SautikitClientSync(api_key="YOUR_API_KEY")
call = client.calls.create(
from_number="+254712345678",
to=["+254700000001"],
)
print(f"Call placed. ID: {call.call_id}, Status: {call.status}")The SDK reads your API key from the SAUTIKIT_API_KEY environment variable by default:
export SAUTIKIT_API_KEY="eyJ..."Or pass it to the constructor:
client = SautikitClient(api_key="eyJ...")Preview: semver pinning recommended. The SDK's public API may change before v1.0. Pin your version in requirements.txt or pyproject.toml:
sautikit==0.x.y
Or in pyproject.toml:
[project]
dependencies = ["sautikit==0.x.y"]Subscribe to releases on GitHub to stay informed of breaking changes.