Skip to main content

hexastack-flags

hexastack-flags

CNCF OpenFeature provider adapters and enterprise feature flagging for Hexastack.

PyPI: hexastack-flags Python 3.12+ Coverage Part of Hexastack Governed by Hexaqual Tested on Hexaqueue 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.13.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.13.0
File Size Uploaded Provenance Actions
hexastack_flags-0.13.0.tar.gz 8.2 kB Without provenance Details for hexastack_flags-0.13.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.3 kB

Release files / hexastack_flags-0.13.0.tar.gz

Download URL hexastack_flags-0.13.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
98ba5d4f36c61b9592ee5eb6e9b91a208be3ceb58be1f28e300f4091b467872c
BLAKE2b-256 checksum
How to use checksums
9e331cbb4bc6ca7939389fe1cf80deda0c060c5b19aafe5516ee2648d3d56469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

Download URL hexastack_flags-0.13.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4845f1ba1452c927eca5ce8b3a7a15a4e0750d38b7d8aae39808f9cec4f1a34b
BLAKE2b-256 checksum
How to use checksums
ea0f0d1b551236afeaf3fbefbf28f9c74e55b31abc03b9ec3a945851dabb4c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for hexastack-flags 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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