Skip to main content

barricador-python-client

PyPI

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 BarricadorClient and asyncio-native AsyncBarricadorClient.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

barricador_client-0.3.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

barricador_client-0.3.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file barricador_client-0.3.0.tar.gz.

File metadata

  • Download URL: barricador_client-0.3.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for barricador_client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 92705554f5012ef35f4f5b12369572e38281831f8e9de22966bfb85252d32f6e
MD5 94215a010787d72217e7f5e9d2882056
BLAKE2b-256 11c8323b022fdfb7da5287c19a065e71e4453d63f9da7d5aeb3340f69fc1e9d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for barricador_client-0.3.0.tar.gz:

Publisher: release.yml on barricador/barricador-python-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file barricador_client-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for barricador_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7356cf660825707dd686bee20497161a589780d647b172d8727ab8e8bd832d37
MD5 e5b298b3535ab9bbf1cf27ed305ddad5
BLAKE2b-256 a5b8c0a2aaf1799328a0dc2ee99286db2599d68f4217f8c96292c55ee331638c

See more details on using hashes here.

Provenance

The following attestation bundles were made for barricador_client-0.3.0-py3-none-any.whl:

Publisher: release.yml on barricador/barricador-python-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

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