Skip to main content

hexastack-flags

hexastack-flags

CNCF OpenFeature provider adapters and enterprise feature flagging for Hexastack.

Part of the Hexastack Framework.

PyPI: hexastack-flags Python 3.13+ Coverage License: Apache 2.0


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

hexastack_flags-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

hexastack_flags-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hexastack_flags-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hexastack_flags-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c391766809a34c0b1d08a8e269448af125ef73227ab5c866092b1aa20a488230
MD5 d78e01b1968f7a4e9a8bee5f8c5d1063
BLAKE2b-256 4b4722968647bf1dc9e0680571dc41c2733a922b9c94f18a325a12e1ffe3fd24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hexastack_flags-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hexastack_flags-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46fc77f867d3be678e178f6d9149d60235bc41bce2f7b70830745c4e8ad6a52e
MD5 3c0f98608f77ca2df87aa365720a5335
BLAKE2b-256 f0258b31e1a6ca0b475d011ca0f319b84e73b357b0b3ede0ed50591409d5244e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 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