{"id":20623020,"url":"https://github.com/dluman/pennant","last_synced_at":"2026-05-28T18:31:04.118Z","repository":{"id":216143184,"uuid":"740567351","full_name":"dluman/pennant","owner":"dluman","description":"A high-spirited feature-flagging library for Python.","archived":false,"fork":false,"pushed_at":"2024-01-08T17:19:04.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T17:10:30.288Z","etag":null,"topics":["conditional-execution","feature-flags","feature-toggles","features","flagging","flags","rollout"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dluman.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}},"created_at":"2024-01-08T15:57:02.000Z","updated_at":"2025-08-25T17:17:05.000Z","dependencies_parsed_at":"2024-01-08T17:43:04.582Z","dependency_job_id":null,"html_url":"https://github.com/dluman/pennant","commit_stats":null,"previous_names":["dluman/pennant"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dluman/pennant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Fpennant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Fpennant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Fpennant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Fpennant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dluman","download_url":"https://codeload.github.com/dluman/pennant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Fpennant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["conditional-execution","feature-flags","feature-toggles","features","flagging","flags","rollout"],"created_at":"2024-11-16T12:25:31.230Z","updated_at":"2026-05-28T18:31:04.070Z","avatar_url":"https://github.com/dluman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pennant\n\n[![PyPI version](https://img.shields.io/pypi/v/pennant)](https://pypi.org/project/pennant/)\n\nA feature flagging library that uses decorators and context management to \"feature flag\" certain\nfunctions or blocks of code. I _feel_ like it's better than a bunch of conditionals, but I'm often\nwrong.\n\n## Installation\n\nFind this tool on `PyPI`: `pip install pennant`\n\n## Usage\n\nContrary to how some folks might do it, this library takes and \"opt-out\" approach where setting the flag to\n`False` prevents the given function or code block from running. As long as the argument provided to the\ndecorator or content manager evaluates to `False`, anything's game.\n\nCheck this out:\n\n```python\nimport pennant\n\n@pennant.FEATURE_FLAG_FUNCTION(False)\ndef print_me(test: str = \"Hello!\") -\u003e str:\n  print(test)\n  return \"!\"\n\ndef main():\n  print(\"This should run none of the following.\")\n  print_me(test = \"Yes!\")\n  with pennant.FEATURE_FLAG_CODE(False):\n    numbers = [1,2]\n    print(numbers)\n\nif __name__ == \"__main__\":\n  main()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdluman%2Fpennant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdluman%2Fpennant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdluman%2Fpennant/lists"}