wsgidav.server.server_cli#

Description

server_cli#

Author:

Martin Wendt

Copyright:

Licensed under the MIT license, see LICENSE file in this package.

Standalone server that runs WsgiDAV.

These tasks are performed:

  • Set up the configuration from defaults, configuration file, and command line options.

  • Instantiate the WsgiDAVApp object (which is a WSGI application)

  • Start a WSGI server for this WsgiDAVApp object

Configuration is defined like this:

  1. Get the name of a configuration file from command line option --config-file=FILENAME (or short -cFILENAME). If this option is omitted, we use wsgidav.yaml in the current directory.

  2. Set reasonable default settings.

  3. If configuration file exists: read and use it to overwrite defaults.

  4. If command line options are passed, use them to override settings:

    --host option overrides hostname setting.

    --port option overrides port setting.

    --root=FOLDER option creates a FilesystemProvider that publishes FOLDER on the ‘/’ share.

Classes

FullExpandedPath(option_strings, dest[, ...])

Expand user- and relative-paths

Functions

run()

Other Members

DEFAULT_CONFIG

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).

DEFAULT_CONFIG_FILES

Try this config files if no --config=.

DEFAULT_VERBOSE

int([x]) -> integer int(x, base=10) -> integer

SUPPORTED_SERVERS

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).

use_lxml

bool(x) -> bool