November 2014
Intermediate to advanced
258 pages
5h 15m
English
SQLAlchemy is a Python SQL toolkit and provides an ORM that gives the flexibility and power of SQL with the feel of Python's object-oriented nature.
Flask-SQLAlchemy is the extension that provides the SQLAlchemy interface for Flask.
This extension can be simply installed using pip as follows:
$ pip install flask-sqlalchemy
The first thing to keep in mind with Flask-SQLAlchemy is the application config parameter that tells SQLAlchemy about the location of the database to be used:
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ('DATABASE_URI')This SQLALCHEMY_DATABASE_URI is a combination of the database protocol, any authentication needed, and also the name of the database. In the case of SQLite, ...
Read now
Unlock full access