msaFeature - Feature switch management with conditions or simple decorators
Optimized for use with Starlette/FastAPI/Pydantic.
Allows to create feature switches and to setup conditions those switches will be enabled
for. Once configured, switches can then be checked against inputs (requests, user objects, etc) to see if the switches are active/enabled.
Documentation: msaFeature Documentation (https://msaFeature.u2d.ai/)
Features
This library includes two versions for FastAPI Feature Flags Management:
- Simple: Just a decorator and configuration with json from a file, dict or via url.
- Complex with Switch & Conditions: Complex version with switches and conditions based on your pydantic model and their business logic.
License Agreement
msaFeatureBased onMITopen source and free to use, it is free for commercial use, but please show/list the copyright information about msaFeature somewhere.
How to create the documentation
We use mkdocs and mkdocsstring. The code reference and nav entry get's created virtually by the triggered python script /docs/gen_ref_pages.py while mkdocs serve or build is executed.
Requirements Install for the PDF creation option:
PDF Export is using mainly weasyprint, if you get some errors here pls. check there documentation. Installation is part of the msaFeature, so this should be fine.
We can now test and view our documentation using:
mkdocs serve
Build static Site:
mkdocs build
Build and Publish
Build:
python setup.py sdist
Publish to pypi:
twine upload dist/*
Metadata
Release files for msaFeature 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| msaFeature-0.0.1.tar.gz | 15.2 kB | Without provenance | Details for msaFeature-0.0.1.tar.gz |
Release files / msaFeature-0.0.1.tar.gz
| Download URL | msaFeature-0.0.1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bce490d8c0cf4649dcaa551fa310b7ccef8b5632ff4f624ef3e621d05b34425
|
|
BLAKE2b-256 checksum How to use checksums |
6189a8731d6f1b657ca941353266834f0c0d5cb06c6cbfc9d9a651d0c18c16bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Security for msaFeature 0.0.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.