Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (19 loc) · 1.34 KB

readme.md

File metadata and controls

24 lines (19 loc) · 1.34 KB

A simple, minimalistic and expandable webserver providing simple web services.

The server built with Twisted and loads all .py files in /services as their own page. The service must set these names:

  • name: A string displayed on the frontpage in bold.
  • description: The description displayed on the frontpage
  • show: boolean value on wether the service should be shown on the frontpage or not
  • Page: A Twisted Resource class, your service's top node.

These are added to __builtin__ for the services to use:

  • PageBase - A modified Twisted Resource class, which handles 404 replies and provides the object Template in self. Template mainly contains the function MakePage(request, body, title=None), used to dress up the output html body nicely.
  • Services - A dictionary containing all the services as modules, indexed by name
  • Settings - Contains the config in a ConfigParser object under the name "conf"
  • reactor - in case you need access to it before reactor.run() is called

Dependencies: