repocribro.repocribro.AUTHOR = 'Marek Suchánek'

Author of the application

repocribro.repocribro.DEFAULT_CONFIG_FILES = ['config/app.cfg', 'config/auth.cfg', 'config/db.cfg']

Paths to default configuration files

class repocribro.repocribro.DI_Container

Simple container of services for web app

  • factories – Factories of services
  • singletons – Singletons (shared objects) of services

Prepare dict for storing services and factories

get(what, *args, **kwargs)

Retrieve service from the container

  • what (str) – Name of the service to get
  • args – Positional arguments passed to factory
  • kwargs – Keyword arguments passed to factory

The service or None

set_factory(name, factory)

Set service factory (callable for creating instances)

  • name (str) – Name of the service
  • factory (callable) – Function or callable object creating service instance
set_singleton(name, singleton)

Set service as singleton (shared object)

  • name (str) – Name of the service
  • singleton (object) – The object to be shared as singleton
repocribro.repocribro.PROG_NAME = 'repocribro'

Name of the application

repocribro.repocribro.RELEASE = '0.1'

Actual release tag

class repocribro.repocribro.Repocribro

Repocribro is Flask web application

Variables:container – Service container for the app

Setup Flask app and prepare service container

repocribro.repocribro.VERSION = '0.1'

Actual version


Factory for making the web Flask application

Parameters:cfg_files – Single or more config file(s)
Returns:Constructed web application
Return type:repocribro.repocribro.Repocribro