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

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.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for spartan_module_feature_flag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af71a1ab467a5760ac1a60c92a9ba3eabcfdff2c4ec7d8422334605ddf8c1ae0
MD5 1e8b1fed3049c4bdad3a286fecb774a9
BLAKE2b-256 1ef6617b7adda7060d465121169aa5dae4f3e8b2101dc58134a83ed21837ece7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spartan_module_feature_flag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa6bfe49f1d347865ebdd2c8c5f379f5a11a587a456776389e857b1b7459ba0f
MD5 efe9f501548ab3c10090a7d7e8573ae5
BLAKE2b-256 576214bb311db492b07f3f2e09e2b3c546e85f85c2df366b77695fffbc65d4c0

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