OpenFeature provider for Flagcel with local CEL evaluation
Project description
Flagcel OpenFeature Provider for Python
OpenFeature provider for Flagcel with local CEL evaluation. The provider polls
Flagcel for evaluation definitions, compiles rules with cel-expr-python, and
evaluates flags in-process.
python -m pip install flagcel-openfeature
from openfeature import api
from openfeature.evaluation_context import EvaluationContext
from flagcel_openfeature import FlagcelProvider
provider = FlagcelProvider(
endpoint="http://localhost:8080/api/v1",
api_key="fc_example_secret",
)
api.set_provider(provider)
client = api.get_client("checkout-service")
enabled = client.get_boolean_value(
"new-checkout",
False,
EvaluationContext(
targeting_key="u_123",
attributes={"user": {"id": "u_123", "country": "US"}},
),
)
Behavior
- Requires Python 3.11+.
- Fetches
GET /eval/definitionsrelative to the configured endpoint. - Sends
Authorization: Bearer <api_key>when an API key is configured; the API key selects the evaluation environment. - Polls definitions every 30 seconds by default.
- Uses
ETagandIf-None-Matchto avoid reloading unchanged definitions. - Evaluates flags locally with CEL expressions from the latest definitions.
- Returns OpenFeature defaults with provider-not-ready details if no definitions have loaded.
- Keeps using last-known definitions after later refresh failures.
- Maps Flagcel reason, variant, and value type into OpenFeature resolution details.
Configure the polling interval in seconds:
provider = FlagcelProvider(
endpoint="http://localhost:8080/api/v1",
api_key="fc_example_secret",
poll_interval=10.0,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flagcel_openfeature-0.1.1.tar.gz.
File metadata
- Download URL: flagcel_openfeature-0.1.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a5031ed4db571c05a2f19f716c9c9ed5a23eb93ad2b1e5c1bf1d3633b8f0838
|
|
| MD5 |
f1a27dba54c8bbdb8423ca7d3ae15a0d
|
|
| BLAKE2b-256 |
1d85a958c32646e955640df55aefc1b3a00103a7b4572845ad787f51fe00c5e2
|
Provenance
The following attestation bundles were made for flagcel_openfeature-0.1.1.tar.gz:
Publisher:
release-py.yml on picunada/flagcel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flagcel_openfeature-0.1.1.tar.gz -
Subject digest:
1a5031ed4db571c05a2f19f716c9c9ed5a23eb93ad2b1e5c1bf1d3633b8f0838 - Sigstore transparency entry: 1844056317
- Sigstore integration time:
-
Permalink:
picunada/flagcel@cf73e71e12d88677dc32e2319fea60a3b2189576 -
Branch / Tag:
refs/tags/sdks/python/v0.1.1 - Owner: https://github.com/picunada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-py.yml@cf73e71e12d88677dc32e2319fea60a3b2189576 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flagcel_openfeature-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flagcel_openfeature-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de5bef1abe7035e9eb487e11a0fcfe058db3f0219b79f44e459bbb0a4b9669f
|
|
| MD5 |
cb2e408621d99e43190ede5c94c51955
|
|
| BLAKE2b-256 |
dabce730a8b4190fa2c42e33714c2bfe808371ca80deb581e2e1d5c6cdbffcf2
|
Provenance
The following attestation bundles were made for flagcel_openfeature-0.1.1-py3-none-any.whl:
Publisher:
release-py.yml on picunada/flagcel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flagcel_openfeature-0.1.1-py3-none-any.whl -
Subject digest:
9de5bef1abe7035e9eb487e11a0fcfe058db3f0219b79f44e459bbb0a4b9669f - Sigstore transparency entry: 1844056482
- Sigstore integration time:
-
Permalink:
picunada/flagcel@cf73e71e12d88677dc32e2319fea60a3b2189576 -
Branch / Tag:
refs/tags/sdks/python/v0.1.1 - Owner: https://github.com/picunada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-py.yml@cf73e71e12d88677dc32e2319fea60a3b2189576 -
Trigger Event:
push
-
Statement type: