Skip to main content

Static Badge Static Badge PyPI - Python Version GitHub last commit (branch) PyPI - Downloads

PyPI version pylint_badge unittest_badge mypy PyPI - License

FastFeatureFlag is a lightweight tool to generate and use feature flags. Build in python for python. The key components are:

  • easy to add feature flag(s)
  • easily activate/deactivate features
  • naming/grouping flags
  • define custom response for flagged features
  • use environment variables as your on/off switch
  • manage feature flags with a simple toml file
  • define a shadow method which should be executed instead of your deactivated feature

🛠 Installation

pip install fastfeatureflag
poetry add fastfeatureflag

🏳 flag away ...

💡 Take a look at the decorator feature_flag() - that is all you need.

from fastfeatureflag.feature_flag import feature_flag

@feature_flag("off")
def broken_feature():
    return "I am broken"

broken_feature()
NotImplementedError: Feature not implemented

Copyright (c) 2012-2023 Sebastian Rieser flyingsepl@googlemail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.4.1 (2023-10-29)

0.4.0 (2023-10-28)

Feat

  • feature_flag: enable self within decorated functions
  • feature_flag: pytest compatibility via .pytest()

0.3.0 (2023-10-25)

Feat

  • feature_flag: use shadow to call a different function/method
  • all: feature flag configuration by file

Fix

  • feature_flag_configuration: updating and synchronising features

Refactor

  • all/*: reduces complexity

0.2.0 (2023-09-02)

Feat

  • all: featuer flag configuration by file
  • flaggen: load configuration

Refactor

  • flaggen: simplified code

0.1.0 (2023-08-14)

Feat

  • feature_flag: add named feature

Fix

  • flaggen: improved the feuatre flag naming
  • feauter_flag: added stateful decorator
  • flaggen,-docs: added dynamic output to feature flag
  • pyflag: simple featue flag implementation

Metadata

Release files for fastfeatureflag 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastfeatureflag 0.4.1
File Size Uploaded Provenance Actions
fastfeatureflag-0.4.1.tar.gz 9.7 kB Without provenance Details for fastfeatureflag-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastfeatureflag 0.4.1
File Interpreter ABI Platform Actions
fastfeatureflag-0.4.1-py3-none-any.whl Python 3 none any Details for fastfeatureflag-0.4.1-py3-none-any.whl

Total release size: 20.6 kB

Release files / fastfeatureflag-0.4.1.tar.gz

Download URL fastfeatureflag-0.4.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c435f2e0d3e752ea7f833f2237f8002a701f33113ec41afbb58a9e7831027a34
BLAKE2b-256 checksum
How to use checksums
5e9cf31abdce2ca75384e9a9389a313a202c1cddcc0a0709bbba3c10c483807a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-35-generic

Release files / fastfeatureflag-0.4.1-py3-none-any.whl

Download URL fastfeatureflag-0.4.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d80067b827752e548377580d17fb2143d24f17689483e8e37f60aaf3989e280
BLAKE2b-256 checksum
How to use checksums
0bc5813e0da7a6d6a52968fa5262386bf0f0c9ef4763fc0d3baa643fcd3827e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-35-generic

Security for fastfeatureflag 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page