Skip to main content

getfluxly (Python)

Server-side Python SDK for GetFluxly. Same surface as the Node SDK so observability across SDKs lives in one mental model.

pip install getfluxly

Quick start (sync)

from getfluxly import Client

client = Client(token="gflux_secret_yourtoken")

client.track("subscription_started",
             external_id="user_42",
             properties={"plan": "pro"})

client.identify(external_id="user_42",
                traits={"email": "x@y.com", "plan": "pro"})

client.alias(user_id="user_42", anonymous_id="anon_a8f3c2")

client.flush()
client.shutdown()  # also runs from atexit

Quick start (async)

from getfluxly import AsyncClient

async with AsyncClient(token="gflux_secret_yourtoken") as ac:
    await ac.track("subscription_started",
                   external_id="user_42",
                   properties={"plan": "pro"})

Defaults

Option Default Notes
flush_at 20 Events queued before forced flush
flush_interval 5.0 Periodic flush cadence, seconds
max_retries 2 Per failed batch
timeout 5.0 Per HTTP request, seconds
max_queue_size 1000 Hard cap, raises queue_overflow

Retries: 408, 425, 429, and 5xx with exponential backoff and +/- 25% jitter. Retry-After is honored. Each batch carries a unique X-Idempotency-Key. Each individual event also carries a stable message_id (UUID v4) generated when the payload is built — the backend uses (project_id, message_id) to deduplicate duplicate deliveries across retries.

Errors

from getfluxly import GFluxError

try:
    client.track("invoice_paid", external_id="user_42")
except GFluxError as e:
    if e.code == "queue_overflow":
        ...  # back-pressure
    elif e.retryable:
        ...  # SDK already retried max_retries times

Full code table at docs.getfluxly.com/snippets/error-table.

Server keys never in browser

Client(token="gflux_secret_...") refuses to construct if it detects a Pyodide / Emscripten runtime, so a server-side script that accidentally ships to the browser fails loudly instead of leaking the key into client traffic.

License

MIT, see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getfluxly-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getfluxly-0.1.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file getfluxly-0.1.1.tar.gz.

File metadata

  • Download URL: getfluxly-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for getfluxly-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0e5b40536e23b982744c7e72c886b41aff5bb3f8dc39a01cbef00d924a35375e
MD5 3889b6d9114a47c92ffcc1f41b7ba723
BLAKE2b-256 1499583fb646afae30b11995f912484ace3d3cf79d6c60f02b762d5587c1ea1c

See more details on using hashes here.

File details

Details for the file getfluxly-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: getfluxly-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for getfluxly-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38ffc101a13994e8b89b104a22ef5930a9e01734804323d10932605ee31e7b04
MD5 e122fab1da0bd0a722b5c2d62bbcd59a
BLAKE2b-256 aa5664bf85c227206e5a4b6439e9120db45900d630a4379372e99dc943443a57

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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