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.0.tar.gz (11.3 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.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feat_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 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.0.tar.gz
Algorithm Hash digest
SHA256 f4e166356be533257a6c72b3210988a9b205512ea0426081829a1fb2f3580116
MD5 73d6b92b8d6e428aa63620ff2f4be5d2
BLAKE2b-256 1843141c4e5f043609b4f43dd17d7321a138640e76c9cc9b703b7de648dee228

See more details on using hashes here.

Provenance

The following attestation bundles were made for feat_sdk-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: feat_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d46b11bfbdb33fe210de001d4db69c1b6d0afc99eae071e206b88324fcb57e5f
MD5 130b7a55761f7bc689e15c17cfc91a4d
BLAKE2b-256 049cf684777e4622d7732bc1a8cad68c72ea82b7125a916433e9dc5674428b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for feat_sdk-0.1.0-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