Skip to main content

Twilio Messaging Python connector

dex-connector-twilio-messaging provides Dex Steps for sendMessage and getMessage and the messageReceived poll Trigger. The send operation uses Dex's single-dispatch heartbeat fence because Twilio Messages has no idempotency key. A response whose outcome cannot be confirmed selects the optional uncertain branch; the application must decide how to reconcile it before another send.

Use new_project_connection(project, "twilio-messaging") in a Worker and bind new_send_message_step or new_get_message_step to the static connection name. See examples/text_message_delivery for a runnable Flow and Worker. The connection has Account SID, optional default sender, endpoint, response size limit, poll interval (at least 5 seconds), and either Account SID/Auth Token or API key credentials; setup guidance lives in the connector manifest. Never put credential values or message body in persisted Attributes or logs.

messageReceived Trigger

messageReceived polls the account's Messages list with the Python poll Trigger kit (dex_connectors.sdk.pollingtrigger, dex-connectors-sdk>=0.12.0) at behavior parity with the Go connector, and delivers one MessageReceivedEvent per inbound message: the safe message view plus its text. The binding's saved to (an E.164 number or whatsapp:+E.164 sender; blank receives every inbound message of the account) is sent as the list's To filter, and outbound messages are never delivered. The first poll records the last two minutes as a baseline. Later polls relist from the date_sent watermark minus two minutes, skip SIDs already delivered, hold an MMS still in receiving for up to ten minutes, and deliver at most 500 messages per page, oldest first. A 429 pauses the connection for Retry-After; an undecodable cursor, or one for another account or number, records a new baseline. The Trigger event ID is twilio-message-<SID>. The connector README describes pagination and window halving.

The cursor token and keyed snapshot match the Go connector byte for byte, so Go and Python replicas share a binding's cursor, and a message a Go replica recorded in the inbox replays in Python. examples/message_received/routing.py records each message in the binding's project Trigger inbox before the watermark commits:

route = ProjectMessageReceivedTriggerRoute(
    MESSAGE_RECEIVED_TRIGGER_BINDING, new_inbound_message_target(dex_client, flow)
)
return new_project_message_trigger_runner(project, connection, [route], logger)

new_message_trigger_runner takes targets and cursor stores directly, and new_message_received_trigger runs one binding with an in-memory cursor, so every start records a new baseline. See examples/message_received for the runnable Worker.

Test

Run uv sync --group dev then uv run pytest from this directory. Shared Go/Python replay fixtures are in conformance/connectors/twilio/messaging. The Trigger tests replay the Go fetcher tests against a local Messages list fake and compare cursor tokens, snapshot keys, request queries, and event payloads with Go-printed values. Local Dex integration tests use dexcli dev; a real Twilio account and sender still require authorization in Dex Web Connections, and live Messages listing has not been verified.

Metadata

Release files for dex-connector-twilio-messaging 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dex-connector-twilio-messaging 0.2.0
File Size Uploaded Provenance Actions
dex_connector_twilio_messaging-0.2.0.tar.gz 106.4 kB Without provenance Details for dex_connector_twilio_messaging-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dex-connector-twilio-messaging 0.2.0
File Interpreter ABI Platform Actions
dex_connector_twilio_messaging-0.2.0-py3-none-any.whl Python 3 none any Details for dex_connector_twilio_messaging-0.2.0-py3-none-any.whl

Total release size: 146.2 kB

Release files / dex_connector_twilio_messaging-0.2.0.tar.gz

Download URL dex_connector_twilio_messaging-0.2.0.tar.gz
Size 106.4 kB
Tags Source
SHA-256 checksum
How to use checksums
215ec832b8a1b89bc1f411811317316c14701c0d2ffb66c45d37a151377b5671
BLAKE2b-256 checksum
How to use checksums
d66d162403e64492a810d22904f9f42f9d14983f1fe8f90e92c02273501451a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dex_connector_twilio_messaging-0.2.0-py3-none-any.whl

Download URL dex_connector_twilio_messaging-0.2.0-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c749393f3882cf5c07b039bf1f2b3adb709c4bada4bf4d6be253b366616546f
BLAKE2b-256 checksum
How to use checksums
56f1cc7b5ee472af44dee82c9f3ecb7459cee35cb8be1587befdcf76c1b2de87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dex-connector-twilio-messaging 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page