Skip to main content

Flowrensic Python SDK

Pre-release. This package is an early preview and not ready for production. Its API can change in any version.

Flowrensic is a platform that runs beside Temporal. It watches what your workflows and workers do and tells you what went wrong, before and after a deploy.

What it does today

  • Connects a Temporal Python worker to your Flowrensic server, with your env access key, so the worker shows up in Flowrensic. Call temporal_flowrensic.client.connect.
  • Every call to Flowrensic carries your env, its access key and the ephemeral run in the headers Flowrensic-Current-Env, Flowrensic-Env-Access-Key and Flowrensic-Current-Ephemeral-Run. Each part takes them as current_env, env_access_key and current_ephemeral_run. An env of kind ephemeral takes the ephemeral run, such as the CI build number, and without one the run is default. The SDK reads no environment variable: you pass the values in code.
  • Records each activity attempt: its result, error type, attempt number and time, with the timeouts and retry limit it ran under. Register temporal_flowrensic.activity.Interceptor in Worker(interceptors=[...]) and give it a sink from temporal_flowrensic.client.create_attempt_sink. Each attempt carries the namespace Temporal gives the activity, so there is no namespace setting. It never changes what an activity returns or raises.
  • The sink keeps the attempts in the worker's memory and sends them to Flowrensic in batches, in the background. Each send has a time limit. When Flowrensic does not answer, the attempts wait and are sent again later. The buffer has a limit on records and on memory, and past it the oldest are dropped and counted.
import temporal_flowrensic.activity
import temporal_flowrensic.client

sink = temporal_flowrensic.client.create_attempt_sink(
    "http://flowrensic:8080", current_env="prod", env_access_key=env_access_key, current_ephemeral_run="prod-1",
    worker_name="orders-worker",
)
worker = Worker(
    client,
    task_queue="main",
    workflows=[...],
    activities=[...],
    interceptors=[temporal_flowrensic.activity.Interceptor(sink, current_env="prod", current_ephemeral_run="prod-1", version=build_id)],
)
  • Worker telemetry: temporal_flowrensic.client.start_telemetry says hello, then sends regular beats so Flowrensic knows the worker is up, the engine's and the worker's own metrics, and the history of each run the worker saw. At shutdown it hands the ephemeral run over. When Flowrensic does not answer, the worker still starts and keeps trying in the background. Give telemetry.sink to the activity interceptor.
telemetry = await temporal_flowrensic.client.start_telemetry(
    server_base_url="http://flowrensic:8080",
    current_env="prod",
    env_access_key=env_access_key,
    current_ephemeral_run="prod-1",
    version=build_id,
    namespace="default",
    temporal_client=client,
)
interceptor = temporal_flowrensic.activity.Interceptor(telemetry.sink, current_env="prod", current_ephemeral_run="prod-1", version=build_id)
# ... run the worker ...
await telemetry.shutdown()
  • Client calls: temporal_flowrensic.client.ClientInterceptor in Client.connect(plugins=[...]) sends every query and signal that fails, and whether it ended on its deadline, under the namespace of the client. temporal_flowrensic.workflow.Interceptor in Worker(interceptors=[...]) counts the queries your workflows answer. Neither changes what a call returns or raises, or what a workflow does.

  • Replay before deploy: in CI, temporal_flowrensic.client.fetch_replay_set writes the histories Flowrensic picks for a workflow type from each env of replay_history_from_envs, such as ["prod", "staging"], asked as your current_env, which must be of kind ephemeral, since a persistent env is refused, you replay them with temporalio's Replayer, and temporal_flowrensic.client.publish_verdicts sends the result back, with the names of the workflow interceptors the replay ran with, as temporal_flowrensic.client.interceptor_name gives them. Give the same interceptors to start_telemetry, so Flowrensic can compare the two lists.

  • Deploy reports from CI: temporal_flowrensic.client.report_deploy_stage sends each stage of a deploy. Every CI call has a time limit and stops with a message that says Flowrensic could not be reached or what it answered. A failed deploy report does not fail the job unless you ask it to.

Planned

  • Each new part of the Node SDK, @flowrensic/temporal-flowrensic-node-sdk, comes to the Python SDK too.

Install

pip install temporal-flowrensic-python-sdk

Metadata

Release files for temporal-flowrensic-python-sdk 0.6.63

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

Source distribution (sdist)

Source distribution for temporal-flowrensic-python-sdk 0.6.63
File Size Uploaded Provenance Actions
temporal_flowrensic_python_sdk-0.6.63.tar.gz 80.0 kB Without provenance Details for temporal_flowrensic_python_sdk-0.6.63.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for temporal-flowrensic-python-sdk 0.6.63
File Interpreter ABI Platform Actions
temporal_flowrensic_python_sdk-0.6.63-py3-none-any.whl Python 3 none any Details for temporal_flowrensic_python_sdk-0.6.63-py3-none-any.whl

Total release size: 191.1 kB

Release files / temporal_flowrensic_python_sdk-0.6.63.tar.gz

Download URL temporal_flowrensic_python_sdk-0.6.63.tar.gz
Size 80.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dd5a629dae6dc86ac737e9185a4d460a98a3c0225d376b6268eeb190af17c8b6
BLAKE2b-256 checksum
How to use checksums
c24d1822a54d6ca5960028a831810e8605cbbf8fe48fb22b462a0064b9c47724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / temporal_flowrensic_python_sdk-0.6.63-py3-none-any.whl

Download URL temporal_flowrensic_python_sdk-0.6.63-py3-none-any.whl
Size 111.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d7db9f7aaead114f8ebc9f5b75cf1957ab8e5fdb368586ed8fbe8651d783851
BLAKE2b-256 checksum
How to use checksums
356b76de1767e8112f436f3f8f7c3dd17ed6cfa355cd3ac00e4714d2a1a028d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for temporal-flowrensic-python-sdk 0.6.63

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.

Release history Release notifications | RSS feed

This release

0.6.63 This release

2 release files No provenance

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