SignalWire Python SDK

raw JSON →
2.1.1 verified Mon Apr 27 auth: no python

Official Python client library for the SignalWire telecom platform, providing voice, video, messaging, and task router capabilities. Current version 2.1.1 requires Python >=3.6. Released under MIT license.

pip install signalwire
error ModuleNotFoundError: No module named 'signalwire.voice'
cause Installed an older version (pre-2.0) that used flat structure.
fix
Upgrade to latest: pip install --upgrade signalwire
error twisted.internet.error.ReactorNotRestartable
cause Calling client.connect() or similar twice in the same process.
fix
Reuse the same client instance across calls, or stop the reactor before restarting.
breaking In version 2.0, the package was restructured from flat module to submodules. Old import paths (e.g., from signalwire import Voice) no longer work.
fix Use from signalwire.voice import Voice
gotcha The library requires Twisted as an event loop; it does not work with asyncio out of the box. Running in an asyncio context may block or cause errors.
fix Use Twisted's reactor or run in a separate thread.
deprecated The signalwire.rest submodule for REST API calls is deprecated. Use signalwire.voice or signalwire.messaging methods instead.
fix Use voice.calls.create() or messaging.send() instead of manual REST requests.

Initialize a Voice client using environment variables for credentials.

import os
from signalwire.voice import Voice

client = Voice(
    project=os.environ.get('SIGNALWIRE_PROJECT', ''),
    token=os.environ.get('SIGNALWIRE_TOKEN', '')
)
print(client)