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.conf 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
FilesystemProvider(root_folder_path[, readonly])
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).
Timer(interval, function[, args, kwargs]) Call a function after a specified number of seconds:
WsgiDAVApp(config)
argparse Command-line parsing library
copy Generic (shallow and deep) copying operations.
io The io module provides the Python interfaces to stream handling.
isfunction(object) Return true if the object is a user-defined function.
json_load(fp[, encoding, cls, object_hook, …]) Deserialize fp (a .read()-supporting file-like object containing a JSON document) to a Python object.
logging Logging package for Python.
os OS routines for NT or Posix depending on what system we’re on.
pformat(object[, indent, width, depth, …]) Format a Python object into a pretty-printed representation.
platform This module tries to retrieve as much platform-identifying data as possible.
print_function
sys This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter.
traceback Extract, format and print information about Python stack traces.
use_lxml bool(x) -> bool
util Miscellaneous support functions for WsgiDAV.
yaml