Skip to content

earthpyy/django-flipt

Repository files navigation

django-flipt

Flipt Integration for Django and Django REST Framework

Installation

pip install django-flipt

Usage

  1. Add flipt into INSTALLED_APPS
INSTALLED_APPS = [
    ...
    'flipt',
]
  1. Define Flipt gRPC endpoint in settings.py
FLIPT_GRPC_HOST = 'flipt:9000'
  1. Ready to go!

Overriding Flags

You can override any flag by defining your flag key and overriding value

FLIPT_FLAG_OVERRIDDEN = {
    'some-flag-key': True
}

Available Classes/Functions

  • flag_enabled
  • flag_disabled
  • FlaggedRouter
  • @flag_check
  • @override_flags
  • {% featureflag %} ... {% endfeatureflag %}
  • FeatureFlagListView
  • flagged_path
  • flagged_re_path

Development

Requirements

  • Docker

Run Project

$ make

Linting/Test Project

$ make lint
$ make test

Credits