Skip to main content

feat.so


feat Python 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_...",
    url="https://data-01.feat.so",  # optional; this is the default
))
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.
  • Streams live updates by default over Server-Sent Events: a background thread holds the connection and applies each pushed datafile the moment it changes.
  • A background poll runs alongside the stream as a safety net. Its cadence follows stream health: while the stream is connected the poll runs at a slow 10-minute interval (the stream is the live path, so the poll only guards against a silently wedged connection); when streaming is off or the stream drops, the poll reverts to the normal interval (poll_interval_seconds, 30s by default and configurable) and becomes the primary refresh path. A dropped stream switches back to the fast interval immediately. Polls are ETag-aware via If-None-Match, and the stream reconnects with exponential backoff.
  • Updates are version-ordered: a datafile is adopted only when its version is strictly newer than the one in memory, so the stream and poll never clobber each other.
  • Evaluation runs in-process: no per-flag network call.
  • close() stops the stream and poll threads cleanly.

Disabling streaming

Set streaming=False to rely on polling alone:

client = Client(ClientConfig(api_key="feat_sdk_...", streaming=False))

License

MIT

Metadata

Release files for feat-sdk 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for feat-sdk 0.3.1
File Size Uploaded Provenance Actions
feat_sdk-0.3.1.tar.gz 27.7 kB With provenance Details for feat_sdk-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for feat-sdk 0.3.1
File Interpreter ABI Platform Actions
feat_sdk-0.3.1-py3-none-any.whl Python 3 none any Details for feat_sdk-0.3.1-py3-none-any.whl

Total release size: 49.3 kB

Release files / feat_sdk-0.3.1.tar.gz

Download URL feat_sdk-0.3.1.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
efe750923435bc29ab382513d6326912475f3e2e1174add274d5a6da771e8ecc
BLAKE2b-256 checksum
How to use checksums
6058a65016fffdafd139982710ec5479da801779eaa5db794a7879ee69f03366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Release files / feat_sdk-0.3.1-py3-none-any.whl

Download URL feat_sdk-0.3.1-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2360e649e825daa8b1545d1e63b60feadc25c73d87e79423ccbdc0a0e5a3e99b
BLAKE2b-256 checksum
How to use checksums
27853b0ceda7c8673a286fe11d1bbc5b8e2ef6cd2467d82612ee9c52fa9db51e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Security for feat-sdk 0.3.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for feat_sdk-0.3.1.tar.gz

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 Jul 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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