flowwatch-client (Python)
Python client for FlowWatch — connects to a running FlowWatch sidecar over HTTP.
Install
pip install flowwatch-client
Usage
Start the FlowWatch sidecar in your Node.js app:
import { createFlowwatch, startSidecar } from "@pranshulsoni/flowwatch"
const fw = await createFlowwatch({ ... })
startSidecar(fw, { port: 9400, token: process.env.SIDECAR_TOKEN })
Then use the Python client:
from flowwatch import FlowwatchClient
fw = FlowwatchClient(base_url="http://localhost:9400", token="your-token")
# Feature flag
enabled = fw.flag("new-checkout", context={"userId": "u_123", "plan": "pro"})
# Trigger a workflow
result = fw.trigger("send-welcome-email", input={"userId": "u_123"})
# Record a trace span
fw.trace_span(name="db.query", type="db", duration_ms=42)
# Capture an error
fw.capture_error(message="Something broke", source="api", name="ValueError")
# Health check
status = fw.health() # {"status": "ok", "sidecar": "flowwatch"}
fw.close()
Use as a context manager:
with FlowwatchClient("http://localhost:9400", token="your-token") as fw:
enabled = fw.flag("dark-mode")
API
| Method | Description |
|---|---|
flag(key, context?) |
Evaluate a feature flag → bool |
trigger(name, input?) |
Trigger a workflow → dict |
trace_span(name, type, duration_ms, metadata?, status?) |
Record a trace span |
capture_error(message, source, name?, stack?) |
Capture an error |
health() |
Sidecar health check → dict |
close() |
Close the HTTP connection |
Release files for flowwatch-client 3.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flowwatch_client-3.1.5.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flowwatch_client-3.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / flowwatch_client-3.1.5.tar.gz
| Download URL | flowwatch_client-3.1.5.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cd5b069f3e63f0de708eea8fc9d93480f566ef988069cc1df56d75d5f6dbfa3
|
|
BLAKE2b-256 checksum How to use checksums |
e67b82fce8f1b6b245692a00d5c04af5fca8675a1406ddba7569fbdb86091a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / flowwatch_client-3.1.5-py3-none-any.whl
| Download URL | flowwatch_client-3.1.5-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d158f545a5a2cdcdc13ce8dd064490b7ef634409856ab4f69593bb9e3386952
|
|
BLAKE2b-256 checksum How to use checksums |
d39124e84abf7702c6d344432a850c863cd17ebe47e0b21f189f7164ccb3cfa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|