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. An unknown outcome resends while possible sends stay below the send cap, so a recipient may receive a duplicate; at the cap it selects the optional uncertain branch, and the application must decide how to reconcile it before another send. A definite refusal is never resent.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dex_connector_twilio_messaging-0.2.1.tar.gz | 113.6 kB | Without provenance | Details for dex_connector_twilio_messaging-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dex_connector_twilio_messaging-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dex_connector_twilio_messaging-0.2.1-py3-none-any.whl |
Total release size: 156.4 kB
Release files / dex_connector_twilio_messaging-0.2.1.tar.gz
| Download URL | dex_connector_twilio_messaging-0.2.1.tar.gz |
|---|---|
| Size | 113.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0ed5d5dbb2809d6d8c86eb91511688ed43f80ff3beb8133b45d92e85d434b1b
|
|
BLAKE2b-256 checksum How to use checksums |
00a6d23494532267c9ec4ebf06ee47c8e261d6d4e22ab9464a0684c615011ded
|
| 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.1-py3-none-any.whl
| Download URL | dex_connector_twilio_messaging-0.2.1-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f87bc755cde0676e3875eed84612c1110ffa9ae8a744ef9216a63a161698bb37
|
|
BLAKE2b-256 checksum How to use checksums |
75bc5cf38d41bbba3b12a69fb0b68c539c699a1eff109e9572217f8f4d0f26dd
|
| 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.1
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.