cubicweb.pyramid
cubicweb.pyramid
#
Pyramid interface to CubicWeb
- cubicweb.pyramid.wsgi_application_from_cwconfig(cwconfig, debugtoolbar=False)[source]#
Build a WSGI application from a cubicweb configuration
- Parameters
cwconfig â A CubicWeb configuration
profile â Enable profiling. See Profiling and performance.
profile_output â Profiling output filename. See Profiling and performance.
profile_dump_every â Profiling number of requests before dumping the stats. See Profiling and performance.
debugtoolbar â Activate pyramid debugtoolbar when True.
- Returns
A fully operationnal WSGI application
- cubicweb.pyramid.wsgi_application(instance_name=None, debug=None)[source]#
Build a WSGI application from a cubicweb instance name
- Parameters
instance_name â Name of the cubicweb instance (optional). If not provided,
CW_INSTANCE
must exists.debug â Enable/disable the debug mode. If defined to True or False, overrides
CW_DEBUG
.
The following environment variables are used if they exist:
- CW_INSTANCE#
A CubicWeb instance name.
- CW_DEBUG#
If defined, the debugmode is enabled.
The function can be used as an entry-point for third-party wsgi containers. Below is a sample uswgi configuration file:
[uwsgi] http = 127.0.1.1:8080 env = CW_INSTANCE=myinstance env = CW_DEBUG=1 module = cubicweb.pyramid:wsgi_application() virtualenv = /home/user/.virtualenvs/myvirtualenv processes = 1 threads = 8 stats = 127.0.0.1:9191 plugins = http,python