Repository navigation
Releases: flaggr-dev/flaggr-python
Releases · flaggr-dev/flaggr-python
Release list
v0.1.1
Fixes from a review of 0.1.0. Upgrade with:
pip install "flaggr @ git+https://github.com/flaggr-dev/flaggr-python@v0.1.1"The wheel and the source distribution are attached below. The package isn't on PyPI yet; 0.1.1 will be the first version uploaded there.
Fixes
- httpx is limited to versions before 1.0 (
httpx>=0.24.0,<1). The httpx 1.0 pre-releases remove the API the SDK uses, so 0.1.0 failed withTypeErrorwhenever a resolver picked one, for example withpip install --pre. - The targeting key is sent as a string.
https://api.flaggr.devignores a targeting key that isn't a string, so with 0.1.0 an integer user ID ({"targeting_key": 42}) got no percentage rollouts, variant splits or per-user overrides. Keys of other types are now converted withstr(). - Context attributes set to
Noneare left out.https://flaggr.devrejected the whole evaluation with HTTP 400 when an attribute wasNone. - Whitespace around
service_idandenvironmentis stripped, as it already was forapi_key, so a value read from an environment variable that ends with a newline works. An emptyenvironmentraisesValueError. - Clearer errors: when the server redirects (an
http://api_url), the error names theapi_urlto use, and HTML error pages are left out of error messages.
Other changes
- README: a working OpenFeature example (OFREP provider), absolute links so the page renders on PyPI, and notes on how the targeting key,
Nonevalues and JSON arrays are handled. - Python 3.14 is tested and listed. On 3.14, httpx itself needs 0.26 or later.
- The release workflow runs the tests before it builds, and pins
pypa/gh-action-pypi-publishto a commit.
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Superseded by v0.1.1. It limits httpx to versions before 1.0 and fixes integer targeting keys; install it instead. 0.1.0 won't be published to PyPI.
First release of the Flaggr Python SDK.
pip install "flaggr @ git+https://github.com/flaggr-dev/flaggr-python@v0.1.0"The wheel and the source distribution are attached below. The package isn't on PyPI yet.
FlaggrClientandAsyncFlaggrClientevaluate flags withPOST /api/flags/evaluateonhttps://api.flaggr.dev(configurable withapi_url).get_boolean,get_string,get_numberandget_objectreturn the value, or your default when the flag doesn't exist or has another type.resolve_*return anEvaluationDetailwith the reason, the variant, an error code (FLAG_NOT_FOUND,TYPE_MISMATCH) and flag metadata.- Failed requests raise
FlaggrError(FlaggrTimeoutErrorfor timeouts) with the HTTP status. - Python 3.9 to 3.13, httpx 0.24 or later, typed (
py.typed).
Docs: https://flaggr.dev/docs/sdk/python-sdk
Full Changelog: https://github.com/flaggr-dev/flaggr-python/commits/v0.1.0