Skip to main content

feat feature-flag SDK for Python (server-side, local evaluation)

Project description

feat-sdk

Server-side Python SDK for feat feature flags. Local flag evaluation against a polled datafile. Zero runtime dependencies (stdlib only).

Install

pip install feat-sdk

Python 3.10+.

Usage

from feat import Client, ClientConfig, EvalContext

client = Client(ClientConfig(
    api_key="feat_sdk_...",
    data_plane_url="https://data.feat.so",
))
client.ready()

ctx = EvalContext(
    targeting_key="user-123",
    kinds={"user": {"plan": "pro", "email": "alice@example.com"}},
)

if client.get_boolean_value("checkout-v2", False, ctx):
    # ...
    pass

client.close()

Use a server API key (feat_sdk_...).

How it works

  • Fetches a per-environment datafile and keeps it in memory.
  • Polls every 30 seconds by default (configurable). ETag-aware via If-None-Match.
  • Evaluation runs in-process: no per-flag network call.
  • A background daemon thread handles polling; close() stops it cleanly.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feat_sdk-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

feat_sdk-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file feat_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: feat_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for feat_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 51f4a2fda3457b713a8bf8cec04540f363032f5bd80429f782879c82e7a3a7f2
MD5 5fd0d71c1d65e966f7bc14577e8ebf07
BLAKE2b-256 6ebbc42fc3a8826c4f7c7381733f505c6eaa42835366f27762e5d7ac8e69e853

See more details on using hashes here.

Provenance

The following attestation bundles were made for feat_sdk-0.1.1.tar.gz:

Publisher: publish.yml on feathq/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file feat_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: feat_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for feat_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4e29b39f24260d465164923cc1c42f61eb1e4b8afdb451226fbb4abaf104caf
MD5 5dcbdbc29f27c035b0d6804f2e6c3a0a
BLAKE2b-256 0f501f0a9f57757266575a5f451d1b440cdf822e154bb3d4662d2f134f0b85b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for feat_sdk-0.1.1-py3-none-any.whl:

Publisher: publish.yml on feathq/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page