Python client SDK for FlowWatch — feature flags, durable workflows, tracing, and error capture
Project description
flowwatch (Python)
Python client for FlowWatch. Wraps the FlowWatch sidecar REST API — requires the sidecar server to be running.
Install
pip install flowwatch-client
Usage
from flowwatch import FlowwatchClient
client = FlowwatchClient("http://localhost:9400", token="your-sidecar-token")
# Feature flag
if client.evaluate_flag("new-billing-flow", {"userId": "u123", "plan": "pro"}):
use_new_flow()
# Durable workflow
result = client.trigger_workflow("checkout", {"cartId": "cart_1"})
print(result["executionId"])
# Auto-timed trace span
with client.trace_span("process-order", "function"):
process_order()
# Error capture
try:
risky()
except Exception as e:
import traceback
client.capture_error(str(e), stack=traceback.format_exc(), source="my-service")
# Health check
print(client.health())
client.close()
Async
from flowwatch import AsyncFlowwatchClient
async with AsyncFlowwatchClient("http://localhost:9400", token="your-token") as client:
enabled = await client.evaluate_flag("dark-mode", {"userId": "u1"})
result = await client.trigger_workflow("send-email", {"to": "user@example.com"})
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flowwatch_client-2.1.0.tar.gz.
File metadata
- Download URL: flowwatch_client-2.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32687c9a7e51fad413278147d79deb0863e53b5241176b69db4d5ee3e915c915
|
|
| MD5 |
3a93f3743e51d2125e8a5421f2026b2f
|
|
| BLAKE2b-256 |
1e2104c8fb20c63f658ddc4cd67a6a90921039cde152d196b07c060893d8c567
|
File details
Details for the file flowwatch_client-2.1.0-py3-none-any.whl.
File metadata
- Download URL: flowwatch_client-2.1.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e09ec7289b766845f9fbea88aa32be18597c85f5d6840cb0e0b24a2b37d6a18
|
|
| MD5 |
d54110ed5c3462b0567a09960f2f2d4d
|
|
| BLAKE2b-256 |
9f72b41727034bbc2a0a7da56253b5dcec5ee022c1bbea1699d5931678e865fc
|