{"id":30493808,"url":"https://github.com/pytlicek/fastapi-featureflags","last_synced_at":"2025-08-24T22:25:31.173Z","repository":{"id":57428489,"uuid":"431191676","full_name":"Pytlicek/fastapi-featureflags","owner":"Pytlicek","description":"FastAPI Feature Flags","archived":false,"fork":false,"pushed_at":"2024-06-10T13:35:59.000Z","size":93,"stargazers_count":70,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-23T22:54:27.173Z","etag":null,"topics":["api","fastapi","fastapi-featureflags","feature-flags","featureflags","hacktoberfest","hacktoberfest-accepted","python","python-framework","python-library","serverless"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fastapi-featureflags/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pytlicek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"pytlicek"}},"created_at":"2021-11-23T17:22:43.000Z","updated_at":"2025-08-23T05:31:56.000Z","dependencies_parsed_at":"2024-01-03T02:30:01.615Z","dependency_job_id":"5c808c1b-5f1c-428d-b9ef-700329f6d2ba","html_url":"https://github.com/Pytlicek/fastapi-featureflags","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.5081967213114754,"last_synced_commit":"900ac4e023f8fa05d52886857de2545c02df2990"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Pytlicek/fastapi-featureflags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2Ffastapi-featureflags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2Ffastapi-featureflags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2Ffastapi-featureflags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2Ffastapi-featureflags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pytlicek","download_url":"https://codeload.github.com/Pytlicek/fastapi-featureflags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2Ffastapi-featureflags/sbom","scorecard":{"id":115405,"data":{"date":"2025-08-11","repo":{"name":"github.com/Pytlicek/fastapi-featureflags","commit":"c49a1645b56acaaa732e7461ab41edbdf01af2c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 4/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/python-publish.yml:11","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-package.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-package.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/Pytlicek/fastapi-featureflags/python-publish.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/python-package.yml:49","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2024-38","Warn: Project is vulnerable to: GHSA-vqfr-h8mv-ghfj","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: GHSA-2c2j-9gv5-cj73","Warn: Project is vulnerable to: GHSA-f96h-pmfr-66vw","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T01:06:58.468Z","repository_id":57428489,"created_at":"2025-08-16T01:06:58.468Z","updated_at":"2025-08-16T01:06:58.468Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271963023,"owners_count":24850599,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","fastapi","fastapi-featureflags","feature-flags","featureflags","hacktoberfest","hacktoberfest-accepted","python","python-framework","python-library","serverless"],"created_at":"2025-08-24T22:25:27.415Z","updated_at":"2025-08-24T22:25:31.159Z","avatar_url":"https://github.com/Pytlicek.png","language":"Python","readme":"[![Test Python package](https://github.com/Pytlicek/fastapi-featureflags/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/Pytlicek/fastapi-featureflags/actions/workflows/python-package.yml) \n[![codecov](https://codecov.io/gh/Pytlicek/fastapi-featureflags/branch/main/graph/badge.svg?token=CVULQJ2SSA)](https://codecov.io/gh/Pytlicek/fastapi-featureflags) \n[![Upload Python Package to PyPI](https://github.com/Pytlicek/fastapi-featureflags/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Pytlicek/fastapi-featureflags/actions/workflows/python-publish.yml) \n![PythonVersions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue) \n[![Sourcery](https://img.shields.io/badge/Sourcery-enabled-brightgreen)](https://sourcery.ai) \n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) \n[![Snyk](https://snyk-widget.herokuapp.com/badge/pip/sheet2dict/badge.svg)](https://snyk.io/advisor/python/fastapi-featureflags) \n[![Downloads](https://pepy.tech/badge/fastapi-featureflags)](https://pepy.tech/project/fastapi-featureflags)\n[![Twitter Follow](https://img.shields.io/twitter/follow/Pytlicek?color=1DA1F2\u0026logo=twitter\u0026style=flat)](https://twitter.com/Pytlicek) \n\n\n# FastAPI Feature Flags\n\nVery simple implementation of feature flags for FastAPI.  \n- Minimum configuration required \n- No unnecessary dependencies\n- Does its job\n\n## Installing\nTo install the package from pip, first run:\n```bash\npip install fastapi-featureflags\n```\n\n## Usage\nA simple example of feature flags:\n```python\nfrom fastapi_featureflags import FeatureFlags, feature_flag, feature_enabled\n\nFeatureFlags(conf_from_url=\"https://pastebin.com/raw/4Ai3j2DC\")\nprint(\"Enabled Features:\", FeatureFlags.get_features())\n\n\n@feature_flag(\"web_1\")\ndef web_1_enabled():\n    print(\"Feature Should be enabled: web_1\")\n\nweb_1_enabled()\n\nif feature_enabled(\"web_2\"):\n    print(\"Feature Should be disabled: web_2\")\n```\n\nYou can get FF (feature flags) from a **File**, **URL**, **Dictionary or ENV Variables**:\n```python\nFeatureFlags.load_conf_from_url(\"https://pastebin.com/raw/4Ai3j2DC\")\nFeatureFlags.load_conf_from_json(\"tests/features.json\")\nFeatureFlags.load_conf_from_dict({\"web_1\": True, \"web_2\": False})\n\nFeatureFlags.reload_feature_flags()\n```\nThere is also a handler that recognizes if the \"@feature_flag\" wrapper is used and the flag is not registered in the config. \nThis way you can also use FF at runtime. Defaults to False, so it's safer if you forget the feature flag in the code.\n\nFunction `get_features` returns a list of all registered FF  \nYou can enable or disable functions on the fly with `enable_feature` or `enable_feature`  \n\nWhen needed you can reload all feature flags with `reload_feature_flags`, \nthis is useful when you want to read and change features from URL. \nAll unregistered or on-the-fly created FF, that are not in the configuration will be omitted.   \n\nFor non-production testing, a router is available, \nso you can see the paths in swagger-ui docs.\nUse `include_in_schema=False` when defining the router for public deployments\n```python\nfrom fastapi_featureflags import router as ff_router\napp.include_router(ff_router, prefix=\"/ff\", tags=[\"FeatureFlags\"])\n```\n---\n\u003cimg width=\"100%\" alt=\"FastAPI-FF\" src=\"https://user-images.githubusercontent.com/1430522/144305907-5e231e64-c120-4bde-9aad-58b9b194a361.png\"\u003e\n\n# Contributing and Code of Conduct  \n### Contributing to fastapi-featureflags  \nAs an open source project, fastapi-featureflags welcomes contributions of many forms.  \nPlease read and follow our [Contributing to fastapi-featureflags](CONTRIBUTING.md)  \n\n### Code of Conduct  \nAs a contributor, you can help us keep the fastapi-featureflags project open and inclusive.  \nPlease read and follow our [Code of Conduct](CODE_OF_CONDUCT.md)  \n","funding_links":["https://ko-fi.com/pytlicek"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytlicek%2Ffastapi-featureflags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytlicek%2Ffastapi-featureflags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytlicek%2Ffastapi-featureflags/lists"}