Asana Python connector
dex-connector-asana v0.2.1 provides typed Dex Steps for listTasks,
getTask, createTask, updateTask, and addComment, and the taskChanged
poll Trigger. Install it with uv add dex-connector-asana==0.2.1; it requires
dex-connectors-sdk 0.12.0 or newer.
The package's generated Config, Credentials, operation models, Step
factories, connection constructors, and mock answers follow
connector.yaml. Application provider calls run inside
the operation-specific Step Execute handlers. Asana has no idempotency key:
createTask and addComment use Dex heartbeat checkpoints to prevent a
second POST after an ambiguous outcome, then read back a known object ID.
Use the approved-task example to run a
Worker with the static asana-tasks connection. It exercises all five
operations through a real Dex Worker and Client in its integration test. The
task-changed example starts one Flow per
task event of a watched project through the taskChanged Trigger.
The connector README covers token setup, branches, and the
provider behavior that remains unverified live.
taskChanged Trigger
taskChanged polls one project's Asana Events API stream,
GET /events?resource=<project gid>&sync=<token>, on the SDK's durable poll
Trigger kit (dex_connectors.sdk.pollingtrigger), at parity with the Go
connector. The connector README describes
the baseline, payload, expired tokens, rate limits, and delivery guarantees;
the Python package keeps every one of them:
- The first poll sends no sync token; Asana's 412 carries the baseline token, so existing tasks are never delivered.
- Each poll follows
has_morethrough at most 10 pages of 100 events and keeps only task events; story, section, and project events are dropped. - A 412 for a stored token, an undecodable cursor, or a cursor for another
project reseeds and logs
poll cursor invalid; reseedingat WARN. A 429 pauses every binding of the connection forRetry-After; other failures back off per binding. None of them moves the cursor. - The cursor token is
{"projectId":"<gid>","sync":"<token>"}, and each Trigger event ID isasana-plus 32 hex digits of a SHA-256 over the requested sync token and the event's immutable facts. Both match Go byte for byte, so Go and Python replicas share one binding's poll cursor and Trigger inbox. - The connection's
pollInterval(Go nanoseconds in the saved configuration,Config.poll_interval_secondsin Python) is the delay between polls, at least 5 seconds;Clientrefuses a shorter one.
The payload is TaskChangedEvent; TaskChangeAction names its five action
values. new_project_task_trigger_runner is the durable path: it loads each
binding's saved project, records each event in the binding's project Trigger
inbox, and commits the sync token in the binding's project poll cursor only
after that. It returns a PollRunner; pass it the connection your Flow uses
and close that connection after the runner stops. From
examples/task_changed/main.py:
target = new_dex_flow_trigger_target(
client,
flow,
accepts_event=accept_every_task_change,
resolve_flow_id=resolve_flow_id,
map_to_flow_input=map_to_flow_input,
)
# Each task event is recorded in the binding's project Trigger inbox before the sync token moves past it.
return new_project_task_trigger_runner(
project,
connection,
ProjectTaskTriggerRunnerConfig(
[ProjectTaskChangedTriggerRoute(TASK_CHANGED_TRIGGER_BINDING, target)]
),
)
new_task_trigger_runner takes targets and cursor stores directly, and
new_task_changed_trigger builds one binding's TriggerRunner with its cursor
in memory, so it records a new baseline on every start; use it only for tests
and demonstrations. Under dexcli dev the project poll cursor also stays in
process memory; hosted project storage keeps it. A binding without a saved
project, or with an invalid one, raises ValueError.
A Flow declares the binding with define_task_changed_trigger_binding in a
get_connector_trigger_bindings method whose body is one return [...]. The
example Flow passes the projectPicker unit
as a ConnectorConfigurationUI. Dex CLI v1.47.3 reads the binding but reports
connector_configuration_ui for that dataclass literal, so Dex Web shows the
binding without the picker. Until the Python analyzer reads it, save the
binding's configuration, such as {"projectId": "1201000000000001"}, in the
triggerBindings entry of the project's connections.json.
Verification
From this directory, run uv sync --locked, uv run pytest tests, and, with
dexcli dev running, DEX_FLOW_SERVICE_ADDRESS=localhost:22240 uv run pytest integration. tests/test_triggers.py checks the fetcher against a local
Events API stand-in, including Go-computed event IDs and cursor tokens, and
integration/test_task_changed.py runs the taskChanged example against real
Dex: a baseline that starts no Flow, one Flow per task event, no Flow for a
comment story, delivery across a restart whose first poll answers 429, and an
expired sync token that records a new baseline without delivering the gap.
Metadata
Release files for dex-connector-asana 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_asana-0.2.1.tar.gz | 121.9 kB | Without provenance | Details for dex_connector_asana-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dex_connector_asana-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dex_connector_asana-0.2.1-py3-none-any.whl |
Total release size: 174.8 kB
Release files / dex_connector_asana-0.2.1.tar.gz
| Download URL | dex_connector_asana-0.2.1.tar.gz |
|---|---|
| Size | 121.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fde9715d60e070f71d99a99a35f13aead5d14726f1c08a00c4ef5987b7811e8a
|
|
BLAKE2b-256 checksum How to use checksums |
5d10a652a12e49ba8f3de6095ee7b14171d2bcd1c9b7740f96660fce04a5a15c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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_asana-0.2.1-py3-none-any.whl
| Download URL | dex_connector_asana-0.2.1-py3-none-any.whl |
|---|---|
| Size | 52.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0443e2816a3a35eb044fe33f2bd6c7d1819177e506ddd7495d5e1c94c38bd26
|
|
BLAKE2b-256 checksum How to use checksums |
56a06eed1b245874ed58229ab0f0a3eb7982b1200aa5c752acf804addf9a115f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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-asana 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.