{"id":24157,"library":"openfeature-provider-flagd","title":"OpenFeature Provider for flagd","description":"This package provides an OpenFeature provider for the flagd flag evaluation engine. It connects to a flagd instance via gRPC, supporting in-process and remote evaluation. Current version: 0.4.1. Requires Python >=3.10. Active development with frequent releases.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/open-feature/python-sdk-contrib","tags":["openfeature","flagd","feature-flags","gRPC","provider"],"install":[{"cmd":"pip install openfeature-provider-flagd","lang":"bash","label":"Stable release"}],"dependencies":[{"reason":"Core OpenFeature SDK for Python is required.","package":"openfeature-sdk","optional":false},{"reason":"Required for gRPC communication with flagd.","package":"grpcio","optional":false}],"imports":[{"note":"Old import path from v0.2.x or earlier; now under 'openfeature.provider.flagd'.","wrong":"from flagd import FlagdProvider","symbol":"FlagdProvider","correct":"from openfeature.provider.flagd import FlagdProvider"}],"quickstart":{"code":"import os\nfrom openfeature import api\nfrom openfeature.provider.flagd import FlagdProvider\n\n# Initialize the provider with a flagd host (default localhost:8013)\nprovider = FlagdProvider(host=os.environ.get('FLAGD_HOST', 'localhost'), port=8013)\napi.set_provider(provider)\nclient = api.get_client()\n\n# Evaluate a boolean flag\nflag_value = client.get_boolean_value(\"my-flag\", False)\nprint(f\"Flag value: {flag_value}\")","lang":"python","description":"Set up the flagd provider and evaluate a boolean flag."},"warnings":[{"fix":"Ensure your runtime uses Python 3.10 or later.","message":"Python 3.9 support dropped in v0.4.0. Upgrade to Python >=3.10.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Review fractional bucketing configuration and test your flag rules after upgrade.","message":"Fractional bucketing behaviour changed in v0.4.0. Existing targetting rules may produce different results.","severity":"breaking","affected_versions":">=0.4.0 <0.4.0? Actually introduced in 0.4.0"},{"fix":"If you rely on exceptions for missing defaults, adjust your error handling.","message":"Graceful fallback to code default changed in v0.3.0: when no default variant is configured, the provider now returns the code default instead of raising an error.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use 'from openfeature.provider.flagd import FlagdProvider'.","message":"The old import path 'from flagd import FlagdProvider' is deprecated.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Configure timeout via FlagdProvider(host=..., port=..., timeout=5) to fail fast.","message":"gRPC connection failure may not raise immediately; default timeout may cause delayed errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install openfeature-sdk openfeature-provider-flagd","cause":"Missing openfeature-sdk dependency.","error":"ModuleNotFoundError: No module named 'openfeature'"},{"fix":"Verify flagd is running and accessible. Check FLAGD_HOST environment variable or pass correct host/port to FlagdProvider.","cause":"Cannot connect to flagd instance at the specified host and port.","error":"grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE..."},{"fix":"Upgrade openfeature-sdk: pip install --upgrade openfeature-sdk","cause":"Using an older version of openfeature-sdk that does not have the 'provider' submodule.","error":"AttributeError: module 'openfeature' has no attribute 'provider'"},{"fix":"Upgrade to latest version: pip install --upgrade openfeature-provider-flagd","cause":"Using an old version of openfeature-provider-flagd (pre-0.3.0) that used different constructor arguments.","error":"TypeError: FlagdProvider.__init__() got an unexpected keyword argument 'host'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}