light-weight feature flags
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fastfeatureflag-0.4.1.tar.gz
.
File metadata
- Download URL: fastfeatureflag-0.4.1.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c435f2e0d3e752ea7f833f2237f8002a701f33113ec41afbb58a9e7831027a34 |
|
MD5 | 47cbb74826144c59188dcdb8919975ce |
|
BLAKE2b-256 | 5e9cf31abdce2ca75384e9a9389a313a202c1cddcc0a0709bbba3c10c483807a |
File details
Details for the file fastfeatureflag-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: fastfeatureflag-0.4.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d80067b827752e548377580d17fb2143d24f17689483e8e37f60aaf3989e280 |
|
MD5 | 352d01e0e140f88b1d3b58b0f57168a7 |
|
BLAKE2b-256 | 0bc5813e0da7a6d6a52968fa5262386bf0f0c9ef4763fc0d3baa643fcd3827e1 |