{"id":22365,"library":"signalwire","title":"SignalWire Python SDK","description":"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.","status":"active","version":"2.1.1","language":"python","source_language":"en","source_url":"https://github.com/signalwire/signalwire-python","tags":["signalwire","telecom","voice","messaging","twisted"],"install":[{"cmd":"pip install signalwire","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Underlying async event loop required for SDK operations","package":"twisted","optional":false},{"reason":"WebSocket connectivity for real-time signaling","package":"autobahn","optional":false}],"imports":[{"note":"Top-level import fails due to package structure; classes live in submodules.","wrong":"from signalwire import Voice","symbol":"Voice","correct":"from signalwire.voice import Voice"},{"note":"Same issue; must import from submodule.","wrong":"from signalwire import Messaging","symbol":"Messaging","correct":"from signalwire.messaging import Messaging"},{"note":"TaskRouter is not exposed at top level.","wrong":"from signalwire import TaskRouter","symbol":"TaskRouter","correct":"from signalwire.task_router import TaskRouter"}],"quickstart":{"code":"import os\nfrom signalwire.voice import Voice\n\nclient = Voice(\n    project=os.environ.get('SIGNALWIRE_PROJECT', ''),\n    token=os.environ.get('SIGNALWIRE_TOKEN', '')\n)\nprint(client)\n","lang":"python","description":"Initialize a Voice client using environment variables for credentials."},"warnings":[{"fix":"Use from signalwire.voice import Voice","message":"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.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use Twisted's reactor or run in a separate thread.","message":"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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use voice.calls.create() or messaging.send() instead of manual REST requests.","message":"The signalwire.rest submodule for REST API calls is deprecated. Use signalwire.voice or signalwire.messaging methods instead.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Upgrade to latest: pip install --upgrade signalwire","cause":"Installed an older version (pre-2.0) that used flat structure.","error":"ModuleNotFoundError: No module named 'signalwire.voice'"},{"fix":"Reuse the same client instance across calls, or stop the reactor before restarting.","cause":"Calling client.connect() or similar twice in the same process.","error":"twisted.internet.error.ReactorNotRestartable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}