MCPcopy
hub / github.com/cherrypy/cherrypy / quickstart

Function quickstart

cherrypy/__init__.py:156–180  ·  view source on GitHub ↗

Mount the given root, start the builtin server (and engine), then block. root: an instance of a "controller class" (a collection of page handler methods) which represents the root of the application. script_name: a string containing the "mount point" of the application. This

(root=None, script_name='', config=None)

Source from the content-addressed store, hash-verified

154
155
156def quickstart(root=None, script_name='', config=None):
157 """Mount the given root, start the builtin server (and engine), then block.
158
159 root: an instance of a "controller class" (a collection of page handler
160 methods) which represents the root of the application.
161 script_name: a string containing the "mount point" of the application.
162 This should start with a slash, and be the path portion of the URL
163 at which to mount the given root. For example, if root.index() will
164 handle requests to "http://www.example.com:8080/dept/app1/", then
165 the script_name argument would be "/dept/app1".
166
167 It MUST NOT end in a slash. If the script_name refers to the root
168 of the URI, it MUST be an empty string (not "/").
169 config: a file or dict containing application config. If this contains
170 a [global] section, those entries will be used in the global
171 (site-wide) config.
172 """
173 if config:
174 _global_conf_alias.update(config)
175
176 tree.mount(root, script_name, config)
177
178 engine.signals.subscribe()
179 engine.start()
180 engine.block()
181
182
183class _Serving(_local):

Callers

nothing calls this directly

Calls 5

mountMethod · 0.80
blockMethod · 0.80
updateMethod · 0.45
subscribeMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…