Flagsman — Python server SDK
Zero-dependency, in-process feature-flag evaluation for Python. The SDK streams your environment's ruleset into memory and evaluates flags locally in microseconds — no network call on your hot path, no per-evaluation charges.
- Local evaluation — decisions are computed in-process from a streamed ruleset.
- Streaming updates — flag changes converge in well under a second (falls back to polling).
- Rigorous — the same
decide()spec every Flagsman SDK implements, asserted by a shared conformance suite. - No dependencies — pure standard library.
Install
pip install flagsman
Usage
from flagsman import FlagsmanClient
client = FlagsmanClient(
base_url="https://api.flagsman.com",
server_key="flags-server-...", # your environment's server-side SDK key
)
client.start()
ctx = {"key": "user-123", "country": "US", "plan": "pro"}
# Boolean flag
if client.bool_variation("checkout.new-payment-flow", ctx, default=False):
render_new_checkout()
# Multivariate flag (string / number / json)
color = client.variation("ui.button-color", ctx, default="blue")
# With evaluation reason (for debugging)
detail = client.variation_detail("ui.button-color", ctx, default="blue")
# Every flag for a context
flags = client.all_flags(ctx)
# Track an experiment goal / conversion
client.track("signup_completed", ctx)
client.stop() # flushes buffered events and stops the stream
Configuration
FlagsmanClient(base_url, server_key, use_stream=True, poll_interval=30.0, request_timeout=10.0, send_events=False, flush_interval=5.0, event_batch_size=25)
use_stream— stream the ruleset (recommended); setFalseto poll.send_events— send exposure/goal analytics events back to Flagsman.
Links
- Documentation: https://docs.flagsman.com
- Homepage: https://flagsman.com
MIT licensed.
Metadata
Release files for flagsman 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flagsman-1.0.0.tar.gz | 11.3 kB | Without provenance | Details for flagsman-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flagsman-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for flagsman-1.0.0-py3-none-any.whl |
Total release size: 22.0 kB
Release files / flagsman-1.0.0.tar.gz
| Download URL | flagsman-1.0.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb4466509f664738c4f6f773ca616b52836268798398ad0270c066fd66caa2ee
|
|
BLAKE2b-256 checksum How to use checksums |
c6c434430d33caccbc95fa0a6fbd01d643e4d85515398c57002374a2b950c228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / flagsman-1.0.0-py3-none-any.whl
| Download URL | flagsman-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
910c53c91451969930cb77f561402e8ef9c337ad7525dd10f5491d61db5c540c
|
|
BLAKE2b-256 checksum How to use checksums |
bbb02f0d2529ee44485738eb6bff6b5556cbb650499d2e298f613575deabb718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for flagsman 1.0.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.