PyCI — Python Configuration Interface

class PyCI

This is the base class of PyCI. It is used by CherryPy to load the index (/), ‘static’, ‘html’, and ‘gettext_json’ requests.

gettext_json(domain, locale_dir=None, indent=False, **kwargs)

Returns a json-encoded version of the locale in question (for the jQuery gettext plugin).

Based on code from http://plugins.jquery.com/project/gettext Thanks Sabin Iacob!

restart_pyci(from_page='/')
Re-initializes the plugin system (i.e. when you change language preferences)
static(filepath, **kwargs)

Returns files from the given filepath. If the file is gzip-compressed the Content-Encoding will be set to ‘gzip’ and the file will be served as-is. under the assumption that the browser can handle gzip compression.

The serve-gzipped-files-as-is method saves a lot of CPU in compressing and decompressing files. Very nice for embedded systems.

version(**kwargs)
Replies with the current version of PyCI (in json format)
main()
Main program method
setup_routes(root=None)
Setup all base routes as well as plugin routes.
start(config=None)
This starts up the cherrypy webserver
verify_db()
Verifies that pyci.db exists and contains at least one permission value. If there’s something amiss this method will attempt to fix it automatically.

This Page

Quick search