Skip to main content

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

openfeature_provider_flagd-0.1.5.tar.gz (84.0 kB view hashes)

Uploaded Source

Built Distribution

openfeature_provider_flagd-0.1.5-py3-none-any.whl (31.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page