— Defernia manager script

This scripts provides several subcommands that manage Defernia instances.

-c config
--config config

Required option. It specify the path of a configruation file.

If there’s no such file, it confirms would you create a such file.

$ --config instance.cfg
instance.cfg doesn't exist yet; would you create it? [y]

Show the help message and exit. initdb — Database initialization

Creates tables into a database.

$ initdb --config instance.cfg

It doesn’t print anything unless errors happened. runserver — Builtin development web server

Runs the development web server.

$ runserver --config instance.cfg
 * Running on
-t host
--host host

The host to bind. Default is

-p port
--port port

The port number to bind. Default is 5000.


Disables the debug mode. Debug mode enabled by default.


Don’t reload automatically even if a file has changed. shell — Interactive shell

It’s similar to Python builtin interactive shell, but it also includes the following variables in the global scope:

engine (sqlalchemy.engine.base.Engine)
The SQLAlchemy connection to the database spcified by configuration.
session (defernia.orm.Session)
The SQLAlchemy session bound to the above engine.
The context local globals provided by Flask.
app (flask.Flask)
The Flask application instance.
defernia (module)
Defernia top-level package.
User (class)
Defernia user model class.
$ shell -c dev.cfg


Internal API

manage_defernia — Defernia manager script


Creates a new config file.


Creates all tables needed by Defernia.