hexastack-flags
CNCF OpenFeature provider adapters and enterprise feature flagging for Hexastack.
Part of the Hexastack Framework.
1. Architectural Overview
hexastack-flags provides the production-grade adapter connecting Hexastack's FeatureFlagPort to the CNCF OpenFeature Python SDK.
It decouples your domain, CQRS handlers, REST routes, Typer commands, and GraphQL resolvers from proprietary feature flagging APIs, allowing seamless integration with Flagd, Unleash, Flipt, GO Feature Flag, or local in-memory providers.
graph TD
APP["Driving Adapters (FastAPI / CLI / GraphQL)"]
CQRS["CQRS Middleware Pipeline"]
PORT["FeatureFlagPort (hexastack-core)"]
ADAPTER["OpenFeatureFlagAdapter (hexastack-flags)"]
OF_SDK["CNCF OpenFeature SDK"]
subgraph Providers ["OpenFeature Providers"]
FLAGD["FlagdProvider (gRPC / Kubernetes)"]
UNLEASH["UnleashProvider"]
MEM["InMemoryProvider"]
ENV["EnvProvider"]
end
APP --> PORT
CQRS --> PORT
PORT -.-> ADAPTER
ADAPTER --> OF_SDK
OF_SDK --> FLAGD
OF_SDK --> UNLEASH
OF_SDK --> MEM
OF_SDK --> ENV
2. Quickstart
Installation
# Core OpenFeature adapter with In-Memory support
pip install hexastack-flags
# With Flagd provider
pip install "hexastack-flags[flagd]"
Configuration (hexastack.toml or pyproject.toml)
[hexastack.flags]
provider = "flagd" # "in_memory", "flagd", "env"
host = "localhost"
port = 8013
cache = true
timeout_ms = 5000
3. Evaluation Examples
from hexastack_core.ports.feature_flags import FeatureFlagPort
from hexastack_core.domain.feature_flags import EvaluationContext
flags = container.resolve(FeatureFlagPort)
# 1. Simple boolean toggle
if flags.is_enabled("features.checkout.v2", default=False):
...
# 2. Contextual evaluation (multi-tenant / user targeting)
ctx = EvaluationContext(user_id="usr_123", tenant_id="tenant-alpha")
theme = flags.get_string_value("features.ui.theme", default="light", context=ctx)
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 hexastack_flags-0.3.0.tar.gz.
File metadata
- Download URL: hexastack_flags-0.3.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e9ddc697ee514f441fa97ebe632c89cc826086ba44fbbd044e31338dffb7a88
|
|
| MD5 |
ef00227af2b44b55456d83e78cdcc0ae
|
|
| BLAKE2b-256 |
9d398f9a2c7183c5623dc34c06ec4d078c1c7686569593a334cea4e75ddf10a9
|
File details
Details for the file hexastack_flags-0.3.0-py3-none-any.whl.
File metadata
- Download URL: hexastack_flags-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cc5efbff3770618d0b02c510ba09f78e169b23348b9dfc1e50ea82e891c230f
|
|
| MD5 |
080796be9d1fff228b5e059fa678e13f
|
|
| BLAKE2b-256 |
a28c90a94c493a4f98b63be21073bc39796100d45602e64474560850f34ecb2b
|