Skip to main content

confeature-client (Python)

Python SDK for Confeature — a drop-in replacement for ConfigCat's official configcat-client Python SDK. Migrate by changing the import name and the SDK key value; no code changes needed.

Install

# Using uv (recommended)
uv add confeature-client

# Using pip
pip install confeature-client

PyPI publish is deferred to a future release; for now, build the wheel from this repository (uv build in apps/sdk-python/) and install via pip install dist/confeature_client-*.whl.

Requires Python 3.10+.

Quickstart

from confeature_client import ConfeatureClient, User

with ConfeatureClient(sdk_key="configcat-sdk-1/...") as client:
    user = User(identifier="alice@example.com")
    enabled = client.get_value("feature.dark-mode", default=False, user=user)
    print(f"dark mode: {enabled}")

Polling modes

Mirrors configcat-client: pick one of AutoPoll() (default, daemon thread polls every 60s), LazyLoad() (fetch on first stale read), or ManualPoll() (only on explicit client.force_refresh()).

from confeature_client import ConfeatureClient, ManualPoll

client = ConfeatureClient(sdk_key="...", polling_mode=ManualPoll())
client.force_refresh()

Flag overrides

Use FlagOverrides(MapOverrideDataSource({...}), OverrideBehaviour.LOCAL_ONLY) to bypass the network entirely (tests, local dev):

from confeature_client import (
    ConfeatureClient,
    FlagOverrides,
    MapOverrideDataSource,
    OverrideBehaviour,
)

client = ConfeatureClient(
    sdk_key="...",
    flag_overrides=FlagOverrides(
        data_source=MapOverrideDataSource({"feature.x": True}),
        behaviour=OverrideBehaviour.LOCAL_ONLY,
    ),
)
assert client.get_value("feature.x", default=False) is True

LOCAL_OVER_REMOTE and REMOTE_OVER_LOCAL are accepted at the type level but raise NotImplementedError at evaluation time (deferred per the parent monorepo's spec 031 §R8).

Migrate from ConfigCat

- import configcatclient
+ from confeature_client import ConfeatureClient
- client = configcatclient.create_client("YOUR-CONFIGCAT-KEY")
+ client = ConfeatureClient(sdk_key="YOUR-CONFEATURE-KEY")

Confeature SDK keys have ConfigCat's own shape, configcat-sdk-1/<22>/<22>, so a key copied from the Confeature dashboard also works in the stock configcat-client. Keys minted before that, confeature-sdk-1-<32>-<32>, are still accepted (is_valid_confeature_key_format checks both).

Method signatures, polling options, flag-overrides semantics, and User field names all mirror configcat-client. The corpus parity tier (tests/parity/test_parity_corpus.py) gates byte-identical output across 58 (flag, user, default) tuples.

Documentation & support

License

MIT. See LICENSE at the package root.

Metadata

Release files for confeature-client 0.1.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 confeature-client 0.1.0
File Size Uploaded
confeature_client-0.1.0.tar.gz 56.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for confeature-client 0.1.0
File Interpreter ABI Platform
confeature_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 124.0 kB

Release files / confeature_client-0.1.0.tar.gz

Download URL confeature_client-0.1.0.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4681c445a0763716f0c1af43e625ea95bdd4a1034725ecf4b849e117b8ee8f7f
BLAKE2b-256 checksum
How to use checksums
f4ef5b28b33f85f0aeb26d14af0d00131f96caa3fb35968439bcade95fa04361
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / confeature_client-0.1.0-py3-none-any.whl

Download URL confeature_client-0.1.0-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f742429f3427fd90def4fdee4a198a781d0de55c8dc453ab221c7adc0911a28e
BLAKE2b-256 checksum
How to use checksums
90757ae667d0d9db70293d6cd1e60d11ef4570b6b1743b4880ef47a1ac0087f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.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