Skip to content
Heroku environment variable configurations for Flask.
Python
Find file
Latest commit 1962cbb Mar 13, 2016 @singingwolfboy singingwolfboy Merge pull request #31 from mattstibbs/patch-1
Add support for Heroku Redis

README.rst

Flask-Heroku

This is a simple Flask extension that sets configuration defaults for Heroku-esque environment variables.

This is far from conclusive. Send a pull request to add a new service!

Usage

Usage is pretty simple:

from flask import Flask
from flask.ext.heroku import Heroku

app = Flask(__name__)
heroku = Heroku(app)

Configuration is already set up:

>>> app.config['SQLALCHEMY_DATABASE_URI']
postgres://...

Alternatively, Flask's application factory pattern is supported:

heroku = Heroku()
# Then, later...
heroku.init_app(app)

Install

Installation is simple:

$ pip install flask-heroku
Something went wrong with that request. Please try again.