Barricador production-grade Python Server SDK (local evaluation, SSE sync, telemetry)
Project description
barricador-python-client
Production-grade Python Server SDK for Barricador. Standard library only (no third-party runtime deps), Python 3.9+.
Install
pip install barricador-client
Guarantees
- Zero-latency evaluation.
is_enabled(...)is a synchronous in-memory dict lookup — no I/O. - Local evaluation that mirrors the backend engine exactly (incl. MurmurHash3 bucketing — verified byte-identical with the Java SDK).
- Real-time sync over SSE on a daemon thread, with exponential backoff + jitter on disconnect and graceful fallback to cached state.
- Async telemetry flushed every 30s; never blocks the host application.
- Two tracks: synchronous
BarricadorClientand asyncio-nativeAsyncBarricadorClient.
Sync usage
from barricador import BarricadorClient, UserContext
with BarricadorClient("sdk-srv-...", base_url="https://app.barricador.com") as client:
user = UserContext("user-123", email="user@enterprise.com", custom={"plan": "pro"})
if client.is_enabled("premium-pricing", user):
...
theme = client.string_variation("homepage-theme", user, "control")
Async usage
from barricador import AsyncBarricadorClient, UserContext
async with await AsyncBarricadorClient.create("sdk-srv-...") as client:
user = UserContext("user-123", country="US")
enabled = client.is_enabled("beta-feature", user) # evaluation is sync (in-memory)
Test
python3 -m unittest discover -s tests -v
Layout
| Module | Responsibility |
|---|---|
barricador.client / barricador.aio |
Sync / async clients |
barricador.evaluation |
Local targeting engine |
barricador.store |
Thread-safe FlagStore + MetricsBuffer |
barricador.transport |
urllib bootstrap/flush + SSE parsing |
barricador.murmur |
MurmurHash3 (cross-SDK consistent) |
barricador.context |
UserContext |
Project details
Release history Release notifications | RSS feed
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 barricador_client-0.2.0.tar.gz.
File metadata
- Download URL: barricador_client-0.2.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a09aaa60c4ee13d07f15fd04368c71b5e05f1febdf75abfa2c17e376f71eb3c2
|
|
| MD5 |
1759c3f3b546ce9d8e8c20d9a269901a
|
|
| BLAKE2b-256 |
1b44851fc9849fd4ce52f80986e0994ff7fba775081d2bcb2ef3dc530eeded6a
|
Provenance
The following attestation bundles were made for barricador_client-0.2.0.tar.gz:
Publisher:
release.yml on barricador/barricador-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barricador_client-0.2.0.tar.gz -
Subject digest:
a09aaa60c4ee13d07f15fd04368c71b5e05f1febdf75abfa2c17e376f71eb3c2 - Sigstore transparency entry: 1959642985
- Sigstore integration time:
-
Permalink:
barricador/barricador-python-client@1e9dd51b1b0575dd0ea8aeb4c7571781c51e5120 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/barricador
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1e9dd51b1b0575dd0ea8aeb4c7571781c51e5120 -
Trigger Event:
push
-
Statement type:
File details
Details for the file barricador_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: barricador_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5bcfb6f71cdad6d1afdf2111b82aa40cd59c9ec6d901d8ad0870915d4c7e829
|
|
| MD5 |
551574c909f33b6fb91e1dbca4e731a7
|
|
| BLAKE2b-256 |
5c125b43da6ae1cd2529b6ce7384ad3e214bc34d6dc068a7ac2f4aed72506ee8
|
Provenance
The following attestation bundles were made for barricador_client-0.2.0-py3-none-any.whl:
Publisher:
release.yml on barricador/barricador-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barricador_client-0.2.0-py3-none-any.whl -
Subject digest:
d5bcfb6f71cdad6d1afdf2111b82aa40cd59c9ec6d901d8ad0870915d4c7e829 - Sigstore transparency entry: 1959643067
- Sigstore integration time:
-
Permalink:
barricador/barricador-python-client@1e9dd51b1b0575dd0ea8aeb4c7571781c51e5120 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/barricador
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1e9dd51b1b0575dd0ea8aeb4c7571781c51e5120 -
Trigger Event:
push
-
Statement type: