Metadata-Version: 2.1
Name: django-flipt
Version: 0.2.0
Summary: Flipt Integration for Django and Django REST Framework
Home-page: https://github.com/earthpyy/django-flipt
License: MIT
Keywords: flipt,django,django-rest-framework,feature-flag,feature-toggle
Author: Preeti Yuankrathok
Author-email: preetisatit@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: rest
Requires-Dist: django (>=3.0.0,<4.0.0)
Requires-Dist: djangorestframework (>=3.12.2,<4.0.0); extra == "rest"
Requires-Dist: flipt-grpc-python (>=0.2.0,<0.3.0)
Project-URL: Repository, https://github.com/earthpyy/django-flipt
Description-Content-Type: text/markdown

# django-flipt
Flipt Integration for Django and Django REST Framework

## Installation

```shell
pip install django-flipt
```

## Usage

1. Add `flipt` into `INSTALLED_APPS`

```python
INSTALLED_APPS = [
    ...
    'flipt',
]
```

2. Define Flipt gRPC endpoint in `settings.py`

```python
FLIPT_GRPC_HOST = 'flipt:9000'
```

3. Ready to go!

### Overriding Flags

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

```python
FLAG_OVERRIDDEN = {
    'some-flag-key': True
}
```

### Available Classes/Functions

- `flag_enabled`
- `flag_disabled`
- `FlaggedRouter`
- `@flag_check`
- `@override_flags`
- `{% featureflag %} ... {% endfeatureflag %}`
- `FeatureFlagListView`

## Development

### Requirements

- Docker

### Run Project

```shell
$ make
```

### Linting/Test Project

```shell
$ make lint
$ make test
```

## Credits

- [Flipt](https://flipt.io)
- Inspired by [django-flags](https://github.com/cfpb/django-flags)

