# Python client for toggling feature flags
___
This Python client is designed to toggle feature flags for a particular user.
This facilitates testing where a feature flag needs to be enabled/controlled.

Getting Started
---------------

### Installation

The installation is very straightforward, but make sure you are using at least
python 3.4. If you use a Mac, you can install it using `brew`. If you use
Windows, just ask for a remote VM that has it installed for you.

```
python -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
```

Usage
-----

#### Toggling a feature

In order to get a toggle a feature, first make sure you define the following
environment variable:

* BASE_QA_URL - ows-features QA URL, e.g. https://qa-ows-features.theorchard.io

Once you have defined this environment variable, you can import OwsFeatures,
NewVariant and UserType and create a new instance of OwsFeatures with the
following:
* Feature name
* User ID
* NewVariant.ENABLED or NewVariant.CONTROL depending on your needs
* UserType.WORKSTATION or UserType.OA depending on your needs

And call update_feature()

See below:

Example:

```python

from feature_flags.ows_features import OwsFeatures, NewVariant, UserType

# Example of enabling a feature
OwsFeatures(
'my_feature', 16888, NewVariant.ENABLED, UserType.WORKSTATION).update_feature()
```
