common.app.app_entrypoint module

The boilerplate implementation of an application

common.app.app_entrypoint.application_entrypoint(application_class, config: Config, argv=None)

The main entry point of the application.

This is a built-in implementation of a typical application.

Parameters
  • application_class – The type of the Application class, that origins from the ApplicationBase.

  • config (Config) – the default configuration object, with environment values applied to it.

  • argv (Array) – The array of CLI arguments. If not defined or None, then the sys.argv[1:] will be used instead.

Example of usage:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''The main entry-point of the application.'''
from common.app import application_entrypoint
from config import config
from app import Application


def main():
    '''The main entry point of the application'''
    application_entrypoint(Application, config)


if __name__ == "__main__":
    main()