semvec/pypi-packages huggingface dataset:
ferris-fab-consul 0.0.34
FAB addon for managing Consul key/value storage
License: BSD

# Ferris FAB Consul

Ferris-Consul is Flask-AppBuilder add on that enables CRUD operations on Consul key/value storage.


## Install

```bash
$ pip install ferris-fab-consul
```

## Configuration

Consul host and port has to be passed via environment variables:

```python
CONSUL_HOST 
CONSUL_PORT
```



## Usage


To enable menu and views within FAB app, add `FerrisConsulManager` to `ADDON_MANAGERS` of your FAB config.

```python
ADDON_MANAGERS = ['ferris_fab_consul.manager.FerrisConsulManager']
```

Consul key can be fetched by invoking ConsuleService directly, e.g.

```python
import json
from ferris_fab_consul.services.consul_service import ConsulService

data = ConsulService().get('key_to_fetch')
val = json.loads(data['Value'])
```