Skip to main content

Dark API SDK - SignalWire/Twilio compatible voice API client

Project description

Dark API SDK

Python SDK for Dark API — a self-hosted CPaaS voice platform fully compatible with SignalWire and Twilio REST API.

Installation

pip install darkapi

Quick Start

from darkapi import Client

client = Client(
    project_id="your-project-id",
    api_token="your-api-token",
    signalwire_space_url="apivoice.co"
)

call = client.calls.create(
    to="+573001234567",
    from_="+18005550100",
    url="https://your-backend.com/xml",
    method="POST",
    timeout=28,
    record=True,
    status_callback="https://your-backend.com/status",
    status_callback_event=["initiated", "ringing", "completed"],
)

print(f"Call SID: {call.sid}")
print(f"Status:   {call.status}")

Migration from SignalWire

Only change the import — everything else stays the same:

# Before
from signalwire.rest import Client

# After
from darkapi import Client

Migration from Twilio

# Before
from twilio.rest import Client

# After
from darkapi import Client

Features

  • Full SignalWire / Twilio REST API compatibility
  • Outbound call creation
  • Call status, fetch and update
  • Answering Machine Detection (AMD) — sync and async
  • Call recording with callbacks
  • Status callbacks (initiated, ringing, answered, completed)
  • LAML/XML verb support (Say, Play, Gather, Record, Hangup, Redirect…)

Documentation

Full API reference: https://apivoice.co/documentation

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

darkapi2-1.0.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darkapi2-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file darkapi2-1.0.0.tar.gz.

File metadata

  • Download URL: darkapi2-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for darkapi2-1.0.0.tar.gz
Algorithm Hash digest
SHA256 34c48c67004d8ab63b4841361c41e5bb17e3b89deffd4515702c7e98dfe96f2c
MD5 34854feedb763c725534b265d6d4a1a5
BLAKE2b-256 d082b39542ef8b0c04a0440f9b26004b947656e9fd33b477e2873b5a2ae3003c

See more details on using hashes here.

File details

Details for the file darkapi2-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: darkapi2-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for darkapi2-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8f9299b98bc699f5db35741b1cc0fe1bcd11efc370eb788031ad539e6acc434
MD5 c99c5411455cf0a5d7c7c7f83a7c446b
BLAKE2b-256 cd20b2011c06ccf59f9e2bddcc208bacc43bdc1d99f713f1ba28e3c7b1eeda65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page