Attention

You are looking at outdated documentation for version 2.x. A newer version is available.

wsgidav.server.server_cli

Description

server_cli

Author:Martin Wendt, moogle(at)wwwendt.de
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_file option is specified
FilesystemProvider(rootFolderPath[, readonly])
WsgiDAVApp(config)
argparse Command-line parsing library
io The io module provides the Python interfaces to stream handling.
isfunction(object) Return true if the object is a user-defined function.
jsmin(js, **kwargs) returns a minified version of the javascript string
json JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format.
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.
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.
useLxml bool(x) -> bool
util Miscellaneous support functions for WsgiDAV.
yaml