flatisfy.web package¶
Submodules¶
flatisfy.web.app module¶
This module contains the definition of the Bottle web app.
flatisfy.web.configplugin module¶
This module contains a Bottle plugin to pass the config argument to any route which needs it.
This module is heavily based on code from [Bottle-SQLAlchemy](https://github.com/iurisilvio/bottle-sqlalchemy) which is licensed under MIT license.
-
class
flatisfy.web.configplugin.
ConfigPlugin
(config)[source]¶ Bases:
object
A Bottle plugin to automatically pass the config object to the routes specifying they need it.
-
KEYWORD
= 'config'¶
-
api
= 2¶
-
apply
(callback, route)[source]¶ Method called on route invocation. Should apply some transformations to the route prior to returing it.
We check the presence of
self.KEYWORD
in the route signature and replace the route callback by a partial invocation where we replaced this argument by a valid config object.
-
name
= 'config'¶
-
-
flatisfy.web.configplugin.
Plugin
¶
flatisfy.web.dbplugin module¶
This module contains a Bottle plugin to pass the database argument to any route which needs it.
This module is heavily based on code from [Bottle-SQLAlchemy](https://github.com/iurisilvio/bottle-sqlalchemy) which is licensed under MIT license.
-
class
flatisfy.web.dbplugin.
DatabasePlugin
(get_session)[source]¶ Bases:
object
A Bottle plugin to automatically pass an SQLAlchemy database session object to the routes specifying they need it.
-
KEYWORD
= 'db'¶
-
api
= 2¶
-
apply
(callback, route)[source]¶ Method called on route invocation. Should apply some transformations to the route prior to returing it.
We check the presence of
self.KEYWORD
in the route signature and replace the route callback by a partial invocation where we replaced this argument by a valid SQLAlchemy session.
-
name
= 'database'¶
-
-
flatisfy.web.dbplugin.
Plugin
¶ alias of
flatisfy.web.dbplugin.DatabasePlugin