Skip to main content

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

spartan-ductduong
Duc Duong
spartan-haobui
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

spartan_module_feature_flag-0.3.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file spartan_module_feature_flag-0.3.1.tar.gz.

File metadata

File hashes

Hashes for spartan_module_feature_flag-0.3.1.tar.gz
Algorithm Hash digest
SHA256 46d4bfd11c04300d3406b8e33c30bdda5ebbb03353be1b7c3fb3ae5f12e62f90
MD5 ff1b9cb8e4595be91dfca36918ee90e0
BLAKE2b-256 102de8a4d035b915831e47ba987a0201e318b6125e7f670a90f1b46b5a77ea9b

See more details on using hashes here.

File details

Details for the file spartan_module_feature_flag-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spartan_module_feature_flag-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daa8660f2b00f0bce899dba372c017c63ce514757d3c0e442ad470cbde103b3c
MD5 eb82d05eee69f39311fa27b8aeced8dc
BLAKE2b-256 10fffd0a1e85abd77fae5dfd5fd592caa852d45fef71c86b0a38b7ee3570a431

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page