Main Reference
The chrysalio Module
The main() function is called when the pserve command is invoked
against this application.
The chrysalio.initialize Module
Main class to initialize the application.
- class chrysalio.initialize.Initialize(configurator: Configurator)[source]
Initialization application class.
- Parameters:
configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.
The chrysalio.relaxng Module
Chrysalio main Relax NG.
- chrysalio.relaxng.includeme(configurator)[source]
Function to include Relax NG.
- Parameters:
configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.
configurator.registry['relaxng']is a dictionary describing the main Relax NG with the following keys:'root': the name of the root element, possibly with namespace'version': the value of attribute version'file': the path to the Relax NG file
The chrysalio.routes Module
Route definitions.
- chrysalio.routes.includeme(configurator: Configurator)[source]
Function to include routes.
- Parameters:
configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.
The chrysalio.security Module
Security functionalities.
- chrysalio.security.includeme(configurator: Configurator)[source]
Function to include authentication mechanism.
- Parameters:
configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.
- class chrysalio.security.SessionAuthenticationPolicy(secret, callback=None, cookie_name='auth_tkt', secure=False, include_ip=False, timeout=None, reissue_time=None, max_age=None, path='/', http_only=False, wild_domain=True, debug=False, hashalg='sha512', parent_domain=False, domain=None, samesite='Lax')[source]
Authentication policy class based on session.
- authenticated_userid(request) str | None[source]
Return the authenticated usr ID or
Noneif no authenticated user ID can be found.- Parameters:
request (pyramid.request.Request) – Current request.
- Return type:
strorNone
- effective_principals(request: Request) list[source]
Return a list of principals including, at least,
pyramid.security.Everyone.- Parameters:
request (pyramid.request.Request) – Current request.
- Returns:
list
- class chrysalio.security.RootFactory(request: Request)[source]
Access Control List (ACL) definition.
- Parameters:
request (pyramid.request.Request) – Current request.
The chrysalio.subscribers Module
Subscriber definition.
- chrysalio.subscribers.includeme(configurator)[source]
Function to include subscribers.
- Parameters:
configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.
- chrysalio.subscribers.before_render(event)[source]
A subscriber for
pyramid.events.BeforeRenderevents.- Parameters:
event (pyramid.events.BeforeRender) – Current event.