A module for managing feature flags.
Project description
spartan-module-feature-flag
This module provides a flexible and standardized way to manage feature flags in Python applications. It supports PostgreSQL for persistent storage and optional Redis caching for improved performance.
Features
- CRUD Operations: Create, read, update, and delete feature flags.
- Database Support: PostgreSQL integration.
- Optional Redis Caching: Cache feature flag data for faster access. Redis integration is optional and can be omitted.
Installation
To install the module and its dependencies, use:
poetry install
Example Usage
In the examples/basic-usage
directory, you will find a complete example of how to use the Feature Flag module in a FastAPI application.
Development
Debugging & Fixing Issues:
Local Debugging: clone the module repository and install it in "editable" mode using pip install -e .
.
Install
- To install the module and its dev dependencies, use:
poetry install --with dev
Run docker-compose
-
To run the PostgreSQL and Redis services, use:
docker-compose -f docker-compose.ci.yml up -d
-
To shut down the services, use:
docker-compose -f docker-compose.ci.yml down
Testing
To run the tests, use:
-
Unit tests:
poetry run pytest tests/unit
-
Integration tests:
poetry run pytest tests/integration
-
Or we can run all tests:
poetry run pytest tests/
Release
Please follow guidelines in docs/RELEASE.md
Contributors
Duc Duong |
Hao Bui |
Project details
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 spartan_module_feature_flag-0.3.0.tar.gz
.
File metadata
- Download URL: spartan_module_feature_flag-0.3.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9be5c6fa54cf5bc66322712a3a460ffd3c41f7acd1370f83c35fc8814e0f08d1 |
|
MD5 | fc0d7e31836b6156024307f2c3f2d5c5 |
|
BLAKE2b-256 | 0d485cac128e7eab20323c15c1ac12ff98562ca340ab7510c087b2d736954f5e |
File details
Details for the file spartan_module_feature_flag-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: spartan_module_feature_flag-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ed4d5fcf560bd0faa947fb8de1feb996da33e881f7ebb79eaaf70320f9c185 |
|
MD5 | a47da3b0679a1f09b23dae516acb4c54 |
|
BLAKE2b-256 | ca93f845b557b405f93bb3a6788ba5fbc51b1a6fec85ea0768c5e8f5522bfe52 |