{"id":20556450,"url":"https://github.com/flagsmith/flagsmith-openfeature-provider-python","last_synced_at":"2025-03-06T06:44:14.264Z","repository":{"id":224971605,"uuid":"764342094","full_name":"Flagsmith/flagsmith-openfeature-provider-python","owner":"Flagsmith","description":"Flagsmith OpenFeature provider for the python SDK","archived":false,"fork":false,"pushed_at":"2024-03-28T10:06:51.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-16T18:26:09.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flagsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-27T22:44:11.000Z","updated_at":"2024-11-13T15:46:32.000Z","dependencies_parsed_at":"2024-03-10T13:25:24.248Z","dependency_job_id":"0c0a865f-a9ea-4fb6-93e8-1ddc04d1f613","html_url":"https://github.com/Flagsmith/flagsmith-openfeature-provider-python","commit_stats":null,"previous_names":["flagsmith/flagsmith-openfeature-provider-python"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flagsmith%2Fflagsmith-openfeature-provider-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flagsmith%2Fflagsmith-openfeature-provider-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flagsmith%2Fflagsmith-openfeature-provider-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flagsmith%2Fflagsmith-openfeature-provider-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flagsmith","download_url":"https://codeload.github.com/Flagsmith/flagsmith-openfeature-provider-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242163854,"owners_count":20082224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:27:53.273Z","updated_at":"2025-03-06T06:44:14.238Z","avatar_url":"https://github.com/Flagsmith.png","language":"Python","readme":"# flagsmith-openfeature-provider-python\n\nThe Flagsmith provider allows you to connect to your Flagsmith instance through the OpenFeature SDK\n\n## Python SDK usage\n\n### Install dependencies\n\nFirst, you'll need to install the OpenFeature SDK and the Flagsmith Provider.  \n\n```bash\npip install openfeature-sdk openfeature-provider-flagsmith\n```\n\n### Using the Flagsmith Provider with the OpenFeature SDK\n\nTo create a Flagsmith provider you will need to provide a number of arguments. These are shown and described \nbelow. See the [Flagsmith docs](https://docs.flagsmith.com/clients/server-side) for further information on the \nconfiguration options available for the Flagsmith python client.\n\n```python\nfrom flagsmith import Flagsmith\nfrom openfeature_flagsmith.provider import FlagsmithProvider\n\nprovider = FlagsmithProvider(\n    # Provide an instance of the Flagsmith python client.\n    # Required: True\n    client=Flagsmith(...),\n    \n    # By enabling the use_flagsmith_defaults setting, you can instruct the OpenFeature SDK to use\n    # the default logic included in the Flagsmith client as per the docs here: \n    # https://docs.flagsmith.com/clients/server-side#managing-default-flags. This will override the \n    # default provided at evaluation time in the OpenFeature SDK in most cases (excluding those where \n    # an unexpected exception happens in the Flagsmith client itself).\n    # Required: False\n    # Default: False\n    use_flagsmith_defaults=False,\n    \n    # By default, when evaluating the boolean value of a feature in the OpenFeature SDK, the Flagsmith \n    # OpenFeature Provider will use the 'Enabled' state of the feature as defined in Flagsmith. This \n    # behaviour can be changed to use the 'value' field defined in the Flagsmith feature instead by \n    # enabling the use_boolean_config_value setting. \n    # Note: this relies on the value being defined as a Boolean in Flagsmith. If the value is not a \n    # Boolean, an error will occur and the default value provided as part of the evaluation will be \n    # returned instead.  \n    # Required: False\n    # Default: False\n    use_boolean_config_value=False,\n    \n    # By default, the Flagsmith OpenFeature Provider will raise an exception (triggering the \n    # OpenFeature SDK to return the provided default value) if the flag is disabled. This behaviour\n    # can be configured by enabling this flag so that the Flagsmith OpenFeature provider ignores\n    # the enabled state of a flag when returning a value.\n    # Required: False\n    # Default: False\n    return_value_for_disabled_flags=False,\n)\n```\n\nThe provider can then be used with the OpenFeature client as per \n[the documentation](https://openfeature.dev/docs/reference/concepts/evaluation-api#setting-a-provider).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflagsmith%2Fflagsmith-openfeature-provider-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflagsmith%2Fflagsmith-openfeature-provider-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflagsmith%2Fflagsmith-openfeature-provider-python/lists"}