Skip to main content
fireweave is the Fireweave server SDK for Python. It evaluates control points and registers targets — the two v1 capabilities. The wire protocol still uses the parameter name flagKey.

Supported versions

From pyproject.toml: There is no [openfeature] extra and no [posthog] extra. Do not run those install commands.

Install

For local checkout development:

Initialize

init_fireweave is the single entry point. mode is required and never inferred. Init raises ConfigurationError when mode is missing, remote credentials are blank, api_url fails the host allowlist, or local mode is combined with credentials.
Production — pass credentials explicitly. The SDK reads no environment variables:
FireweaveClient is a context manager: with init_fireweave(mode="local") as client:. Lower-level construction:
The async fireweave.aio / AsyncFireweaveClient surface is gone.

Configuration and authentication

Remote mode speaks POST /v1/flags/evaluate and POST /v1/targets/register. Auth is Authorization: Bearer <key>. https off-loopback; http on loopback only. A literal "*" disables host pinning. See Configuration and auth.

Targets

register_target lives on the client.
RegisterTargetOptions: kind ("user" or "device"), properties, environment. Returns ok=False rather than raising. In local mode the adapter records the target in-process and traces the call. InMemoryAdapter does not implement registration. See Targeting and targets.

Control points

client.control_points is the product API. client.flags is the same object. The alias shares identity. On first access Python emits one DeprecationWarning per process. FlagType: BOOLEAN, STRING, NUMBER, OBJECT. There is no separate integer/float type in v1.
Nine methods: get_boolean_value, get_string_value, get_number_value, get_object_value, get_boolean_details, get_string_details, get_number_details, get_object_details, evaluate. Evaluation never raises. get_integer_value is a deprecated alias of get_number_value. It still works and logs one DeprecationWarning per process. Use get_number_value. See Control points.

Adapters

See Adapters.

Errors

ErrorKind has the same 15 PascalCase kinds. Concrete subclasses include NotReadyError, FlagNotFoundError, TypeMismatchError, InvalidContextError, TargetingKeyMissingError, AuthenticationError, AuthorizationError, RateLimitedError, TimeoutError_, NetworkError, BackendUnavailableError, MalformedResponseError, UnsupportedCapabilityError, ConfigurationError, AlreadyClosedError, InternalError. Evaluation never raises. Init can raise ConfigurationError. See Errors.

Testing

InMemoryAdapter fixture fields used in tests: type, enabled, value, variant, optional matchAttribute. Local mode is enough for an offline boolean seed. The repo test-server does not implement POST /v1/targets/register. See Testing.

Shutdown

See Initialize, ready, shutdown.

Not in this SDK

  • fireweave[openfeature] or fireweave[posthog]
  • FireweaveProvider / make_fireweave_local_provider
  • releases, exposures, signals, capabilities, guardrails
  • Environment-variable auto-read
  • AsyncFireweaveClient / fireweave.aio
  • A camelCase controlPoints namespace (Python is control_points)

Next

Quickstart

Offline evaluate in every language.

Compatibility

Seven-language surface and the 65×7 aggregate.
Last modified on September 11, 2026