pyrocore.daemon package

Background Daemon Package.

Copyright (c) 2012 The PyroScope Project <pyroscope.project@gmail.com>

Submodules

pyrocore.daemon.webapp module

rTorrent web apps.

Copyright (c) 2013 The PyroScope Project <pyroscope.project@gmail.com>

class pyrocore.daemon.webapp.JsonController(**kwargs)[source]

Bases: object

Controller for generating JSON data.

ERRORS_LOGGED = set([])
guarded(func, *args, **kwargs)[source]

Call a function, return None on errors.

json_charts(req)[source]

Return charting data.

json_engine(req)[source]

Return torrent engine data.

class pyrocore.daemon.webapp.Router[source]

Bases: object

URL router middleware.

See http://docs.webob.org/en/latest/do-it-yourself.html

ROUTES_RE = <_sre.SRE_Pattern object>
add_route(template, controller, **kwargs)[source]

Add a route definition

controller can be either a controller instance, or the name of a callable that will be imported.

classmethod parse_route(template)[source]

Parse a route definition, and return the compiled regex that matches it.

class pyrocore.daemon.webapp.StaticFolders(paths, fileapp=None, **kw)[source]

Bases: object

An application that serves up the files in a list of given directories.

Non-existent paths are ignored. Pass a fileapp factory to change the default file serving app.

pyrocore.daemon.webapp.make_app(httpd_config)[source]

Factory for the monitoring webapp.

pyrocore.daemon.webapp.module_test()[source]

Quick test using…

python -m pyrocore.daemon.webapp