Skip to main content

Gorgias Python connector

dex-connector-gorgias v0.2.0 implements the six Gorgias ticket and customer operations declared in connector.yaml for Dex Python applications: search tickets, get a ticket, find a customer by email, create a ticket, update a ticket, and add an internal note or public email reply. It also implements the ticketChanged poll Trigger. It requires dex-connectors-sdk>=0.12.0, which adds the poll Trigger kit.

Use new_project_connection(project, "gorgias") to bind a Dex Web connection. The connection resolves the Gorgias email and API key on each provider call. new_connection accepts a configured Client for an application that supplies its own credential provider. Close an owned client after the Worker stops.

The runnable examples/triage_issue Flow exercises ticket search and detail lookup. For provider behavior, supply a connection through Dex Web and run the example against a real Gorgias account. The local integration test uses a provider stand-in and does not establish live provider authorization.

ticketChanged Trigger

ticketChanged delivers each Gorgias ticket event, such as ticket-created, ticket-updated, or ticket-closed, recorded after the binding first started, as a TicketChangedEvent with event_id, event_type, ticket_id, occurred_at, user_id (zero for a rule), and context. Each poll reads GET /api/events in created_datetime order. The behavior matches the Go connector, which the connector README describes in full: the first poll records a baseline at Gorgias's Date header and delivers nothing, each poll rereads a 15-second overlap and skips events it has seen, it reads at most five pages of 100 events per poll and stops paging when X-Gorgias-Account-Api-Call-Limit shows three quarters of the window spent, a 429 pauses the connection for Retry-After, a 400 backs off and retries from the same position, and only an undecodable cursor records a new baseline. Event IDs are gorgias-event-<id>, stable across refetches. The cursor token is byte-compatible with Go, and inbox payloads use the Go JSON fields, so Go and Python replicas can share one binding; tests/test_ticket_changed_go_parity.py replays a Go recording to prove it.

The connection's pollInterval setting, Config.poll_interval_seconds in code, is the delay between polls; Client rejects one under 10 seconds.

Function Use
new_project_ticket_trigger_runner(project, connection, config) Durable delivery from a LoadedProject: each route's saved binding configuration is loaded (an unsaved binding delivers every ticket event type), and each event is recorded in the binding's project Trigger inbox before its cursor commits.
new_ticket_trigger_runner(config) One PollRunner for TicketChangedTriggerRoute values with your own targets and cursor stores; a route without a cursor keeps it in memory.
new_ticket_changed_trigger(connection=, binding_name=, configuration=, target=) One in-memory TriggerRunner, like Go's generated NewTicketChangedTrigger; it records a new baseline on every start.
define_ticket_changed_trigger_binding(connection_name=, binding_name=) Declares the binding in a Flow's get_connector_trigger_bindings. Dex Web shows no field for it.

TicketChangedTriggerConfiguration.event_types narrows deliveries to some of TICKET_EVENT_TYPES; skipped events still advance the cursor. The ticket_changed example wires a Flow target in worker.py:

runner = new_project_ticket_trigger_runner(
    project,
    connection,
    ProjectTicketTriggerRunnerConfig(
        [ProjectTicketChangedTriggerRoute(BINDING_NAME, new_ticket_change_flow_target(dex_client, flow))]
    ),
)

PollRunner.run(TriggerContext(cancellation)) replays the inboxes, seeds, and polls until the cancellation fires, then raises TriggerDeliveryAbortedError. Live Gorgias polling has not been verified.

Tests

Run uv sync --group dev and uv run pytest tests from this directory. The conformance test replays the Go connector's recorded provider scenarios.

Metadata

Release files for dex-connector-gorgias 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-gorgias 0.2.0
File Size Uploaded Provenance Actions
dex_connector_gorgias-0.2.0.tar.gz 149.9 kB Without provenance Details for dex_connector_gorgias-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 207.9 kB

Release files / dex_connector_gorgias-0.2.0.tar.gz

Download URL dex_connector_gorgias-0.2.0.tar.gz
Size 149.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a4a48ddb36ec199439940175120703dd54c248b87e9d5e486517f2ca570ec6b
BLAKE2b-256 checksum
How to use checksums
0139338131bc35331e6fce7cf8d3fb7340c1d908cfe002d2b5bdb6d86db62de6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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_gorgias-0.2.0-py3-none-any.whl

Download URL dex_connector_gorgias-0.2.0-py3-none-any.whl
Size 58.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f2b45a7c0ef36a69f8b0186e43a70b56afa8054ada1b8172bd8e41b7b437d2f
BLAKE2b-256 checksum
How to use checksums
d2e5ecbfb385f85490842d3ec326f951700ef44403b5c7f94df28040d6fb3cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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-gorgias 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