OpenFeature provider for the flagd flag evaluation engine
Project description
flagd Provider for OpenFeature
This provider is designed to use flagd's evaluation protocol.
Installation
pip install openfeature-provider-flagd
Configuration and Usage
Instantiate a new FlagdProvider instance and configure the OpenFeature SDK to use it:
from openfeature import api
from openfeature.contrib.provider.flagd import FlagdProvider
api.set_provider(FlagdProvider())
To use in-process evaluation in offline mode with a file as source:
from openfeature import api
from openfeature.contrib.provider.flagd import FlagdProvider
from openfeature.contrib.provider.flagd.config import ResolverType
api.set_provider(FlagdProvider(
resolver_type=ResolverType.IN_PROCESS,
offline_flag_source_path="my-flag.json",
))
Configuration options
The default options can be defined in the FlagdProvider constructor.
Option name | Type & Values | Default |
---|---|---|
host | str | localhost |
port | int | 8013 |
schema | str | http |
timeout | int | 2 |
License
Apache 2.0 - See LICENSE for more information.
Project details
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
File details
Details for the file openfeature_provider_flagd-0.1.5.tar.gz
.
File metadata
- Download URL: openfeature_provider_flagd-0.1.5.tar.gz
- Upload date:
- Size: 84.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e00d67eb6987cdfd62cb60ecf0b2b2bb12f9834f9d009e63af2dbbf73d7603d9 |
|
MD5 | a0e1155e8778fa83c918ea2eb862eba4 |
|
BLAKE2b-256 | ea7f3ee415e6c05a54559ccbad9c226808153dd3f961a88d0a816cfb61b6d46e |
File details
Details for the file openfeature_provider_flagd-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: openfeature_provider_flagd-0.1.5-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff1020899495b56d968b23b804e7b77e5109baee5ca2ef5df7f879e3b22f9c22 |
|
MD5 | 90d81855147548e9d3061d85876d355a |
|
BLAKE2b-256 | 23adffdc1d72b8d5fafcef0f5c02aa63a9c67841a6547a8dea5d126d3b292b7b |