Skip to content

feathq/python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Official Python SDK for the feat feature-flag platform.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages