Subsections


5.3.2 configuration

The aspen.configuration object provides raw access to the parser objects used to configure your server, and a number of basic settings.

5.3.2.1 Parsers

The various parsers and raw settings are exposed as these members:

args
An argument list as returned by optparse.OptionParser.parse_args.

conf
An instance of aspen._configuration.ConfFile; see above.

optparser
An optparse.OptionParser instance.

opts
An optparse.Values instance per optparse.OptionParser.parse_args.

paths
An instance of aspen._configuration.Paths; see below.

5.3.2.2 Settings

Furthermore, aspen.configuration exposes specific configuration settings as these members:

address
A (hostname, port) tuple (for AF_INET and AF_INET6 address) or string (for AF_UNIX) giving the address to which Aspen is bound.

command
A string giving the command line argument (start, stop, etc.).

daemon
A boolean indicating whether Aspen is acting as a daemon.

defaults
A tuple listing the default resource names to look for in a directory.

http_version
A string indicating the HTTP version to speak, either 1.0 or 1.1.

sockfam
One of socket.AF_INET, socket.AF_INET6, and socket.AF_UNIX.

threads
A non-zero positive integer; the number of threads in the server's request-handling thread pool.

All members are intended to be read-only.

See Also:

ConfigParser
The naming is not PEP 8, but the documentation is fine.

optparse
On the other hand, the documentation for optparse is rather, um, convoluted. Good luck!

Aspen is copyright © 2006-2007 by Chad Whitacre and contributors, and is offered under the MIT license.