This repository has been archived by the owner. It is now read-only.
Heroku environment variable configurations for Flask.
Branch: master
Clone or download
singingwolfboy Merge pull request #35 from vmax/mlab-mongodb
Add mLab MongoDB; complain about several mongo installations
Latest commit 98e03c0 May 13, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore update project URL, add gitignore Nov 6, 2013
README.rst Updates readme to use new-style import Jan 22, 2013
flask_heroku.py Less obscure way to fix whether we have multiple Mongo addons May 12, 2017
setup.py Version 0.1.8 Nov 9, 2013

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