Coaster

Coaster documentation

Coaster contains functions and db models for recurring patterns in Flask apps. Coaster is available under the BSD license, the same license as Flask.

Coaster types

coaster.typing.ReturnDecorator = typing.Callable[[~WrappedFunc], ~WrappedFunc]

Return type for decorator factories

coaster.typing.WrappedFunc = ~WrappedFunc

Type used for functions and methods wrapped in a decorator

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.

Indices and tables