trustrachel/Flask-FeatureFlags — pull request #8 by iurisilvio (2014-07-31 18:33:18+00:00)
Title: SQLAlchemy handler

My proposal to make an SQLAlchemy handler.

You just need a `SQLAlchemy` instance (from Flask-SQLAlchemy extension) and a `check` method in the model.

```
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.featureflags import FeatureFlag
from flask.ext.featureflags.contrib.sqlalchemy import SQLAlchemyFeatureFlags

app = Flask(__name__)
db = SQLAlchemy(app)
handler = SQLAlchemyFeatureFlags(db)

ff = FeatureFlag(app)
ff.handlers = [handler]
```