Database session and instance¶
Coaster provides an instance of Flask-SQLAlchemy. If your app has models distributed across modules, you can use coaster’s instance instead of creating a new module solely for a shared dependency. Some Hasgeek libraries like nodular and Flask-Commentease depend on this instance for their models.
-
coaster.db.
db
¶ Instance of
SQLAlchemy
Caution
This instance is process-global. Your database models will be shared across all apps running in the same process. Do not run unrelated apps in the same process.