server.core
Attributes
Classes
dict() -> new empty dictionary |
|
A WSGI application that hosts multiple WSGI applications in the |
Module Contents
- class server.core._OptionalDictConfigArgs[source]
Bases:
TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class server.core.Request(environ, charset=None, unicode_errors=None, decode_param_names=None, **kw)[source]
Bases:
webob.request.BaseRequest
- class server.core.Server(config: server.config.Config, configure_morepath: bool = True, configure_logging: bool = True, post_mortem: bool = False, environ_overrides: dict[str, Any] | None = None, exception_hook: Callable[[WSGIEnvironment], Any] | None = None)[source]
A WSGI application that hosts multiple WSGI applications in the same process.
Not to be confused with Morepath’s mounting functionality. The morepath applications hosted by this WSGI application are root applications, not mounted applications.
See Morepath’s way of nesting applications
Applications are hosted in two ways:
As static applications under a base path (/app)
As wildcard applications under a base path with wildcard (/sites/*)
There is no further nesting and there is no way to run an application under /.
The idea for this server is to run a number of WSGI applications that are relatively independent, but share a common framework. Though thought to be used with Morepath this module does not try to assume anything but a WSGI application.
Since most of the time we will be running morepath applications, this server automatically configures morepath for the applications that depend on it.
If morepath autoconfig is not desired, set
configure_morepath
to False.- configure_logging(config: _OptionalDictConfigArgs | _DictConfigArgs) None [source]
Configures the python logging.
- Config:
A dictionary that is understood by python’s logging.config.dictConfig method.