Skip to main content

hexastack-flags

hexastack-flags

CNCF OpenFeature provider adapters and enterprise feature flagging for Hexastack.

PyPI: hexastack-flags Python 3.13+ Coverage Part of Hexastack Governed by Hexaqual License: Apache 2.0

Part of the Hexastack Framework · Governed by Hexaqual.


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)

Metadata

Release files for hexastack-flags 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexastack-flags 0.7.0
File Size Uploaded
hexastack_flags-0.7.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hexastack-flags 0.7.0
File Interpreter ABI Platform
hexastack_flags-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / hexastack_flags-0.7.0.tar.gz

Download URL hexastack_flags-0.7.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
022aa1d19159e3e19a1364eaf5f6d3fec8dfa749603c52e8c710e7672a8be977
BLAKE2b-256 checksum
How to use checksums
2297b8892677eefae4820e8ca0e9102b95abc298f355b985998fc793cd4bc840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hexastack_flags-0.7.0-py3-none-any.whl

Download URL hexastack_flags-0.7.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98696e1c43b754b34188da1550daf4747d5f1342befd96d9fa01cfd22d392e0b
BLAKE2b-256 checksum
How to use checksums
94f325a147afcfecf2f7153880b3e9aaa9e569970dacadeca5ad22a3d814344a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.8.0

2 release files

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release 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