Initialization Reference

The __init__ Module

The main() function is called when the pserve command is invoked against this application.

publiforge.main(global_config, **settings)[source]

This is the main function. It returns a Pyramid WSGI application.

  • global_config – (dictionary) Default section of INI file.
  • settings – (dictionary) Application settings of [app:publiforge] section of INI file.

(object) WSGI application.

It creates an instance of Initialize class and call its all() method to initialize the application.

The initialize Module

When you launch the PubliForge application, this module determines which mode you are running: front, agent or both. According to this mode, it sets up database, creates a instance of FrontBuildManager class, an instance of HandlerManager, an instance of AgentBuildManager class and makes required directories.

class publiforge.initialize.Initialize(global_config, configurator)[source]

Initialization application class.


Check settings and create registry objects.

publiforge.initialize.perm_group_finder(login, request)[source]

Return permission groups of current user.

class publiforge.initialize.RootFactory(request)[source]

Return the traversal root of the application.

Its main role is to define Access Control List (ACL). See Permissions for a complete description of permissions.


A subscriber for events.


A subscriber for events.


Add Web front routes.


Add agent routes and methods.