Skip to main content

fireweave (Python SDK)

Fireweave polyglot SDK for Python — OpenFeature-compatible, server-first flag evaluation with release-safety extensions (spec v0.1.0).

  • Core: zero runtime dependencies (fireweave + InMemoryAdapter).
  • Extras: fireweave[posthog] (PostHog backend, posthog==7.31.0), fireweave[openfeature] (OpenFeature provider, openfeature-sdk>=0.10,<0.11).

Quick start (offline, in-memory)

from fireweave import FireweaveClient, FireweaveRuntime, InMemoryAdapter

adapter = InMemoryAdapter({
    "new-checkout": {"type": "boolean", "enabled": True, "variant": "on", "value": True},
})
runtime = FireweaveRuntime(adapter)
runtime.initialize()
client = FireweaveClient(runtime)

assert client.flags.get_boolean_value("new-checkout", False) is True
client.shutdown()

OpenFeature

from openfeature import api
from fireweave import FireweaveRuntime, InMemoryAdapter
from fireweave.openfeature import FireweaveProvider

api.set_provider(FireweaveProvider(FireweaveRuntime(InMemoryAdapter({...}))))
client = api.get_client()
client.get_boolean_value("new-checkout", False)

PostHog backend

from fireweave import FireweaveConfig, FireweaveRuntime, FireweaveClient
from fireweave.adapters.posthog import PostHogAdapter

config = FireweaveConfig(project_api_key="phc_...", host="https://us.i.posthog.com")
runtime = FireweaveRuntime(PostHogAdapter(config=config), config)
runtime.initialize(backend_required=True)
client = FireweaveClient(runtime)

Sync / async

The core is a thread-safe sync runtime; asyncio servers use fireweave.aio.AsyncFireweaveClient, which offloads calls via asyncio.to_thread. See docs/adr/0004 and the module docstring.

Development

python -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/pytest                                   # unit + conformance tests
.venv/bin/python conformance/run_conformance.py    # normalized results JSON

Download files

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

Source Distribution

fireweave-0.1.0.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

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

fireweave-0.1.0-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file fireweave-0.1.0.tar.gz.

File metadata

  • Download URL: fireweave-0.1.0.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fireweave-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98a394dce1200effca6078aaa06e32d5313419fa7768f33a4ca79d58b923a20e
MD5 807fbea9e25b0770cfba20e2640f6519
BLAKE2b-256 c88073e5055337fc68fd3416169a237ccdd9ee687e3eb5b7b6225a5f10b336c0

See more details on using hashes here.

File details

Details for the file fireweave-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fireweave-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fireweave-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a96b016102a6dc09207f702557f47b640cbc607364effb24ebb9471c0a6edce9
MD5 98124025ea9a4b01ab92611851f316c2
BLAKE2b-256 5b4681e81bfa92f30710f9a98e8713f56094117bd6349d470f6ee04e0f5d3959

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page