Skip to content

v0.1.1

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Oct 13:05

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 with TypeError whenever a resolver picked one, for example with pip install --pre.
  • The targeting key is sent as a string. https://api.flaggr.dev ignores 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 with str().
  • Context attributes set to None are left out. https://flaggr.dev rejected the whole evaluation with HTTP 400 when an attribute was None.
  • Whitespace around service_id and environment is stripped, as it already was for api_key, so a value read from an environment variable that ends with a newline works. An empty environment raises ValueError.
  • Clearer errors: when the server redirects (an http:// api_url), the error names the api_url to 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, None values 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-publish to a commit.

Full Changelog: v0.1.0...v0.1.1