1.2 Features

Besides the split-up of code into functional code (the handler) and markup code (the template), Draco offers a set of facilities that make the development of dynamic web sites easier. Some of these features are:

Session Management
An advanced builtin transparent session management system allows you track user sessions and store data for them. Both cookie and url tagging methods are supported. Web robots are excluded from session management. They are detected based on an extensive database of user agent fingerprints.

User Management
The session management subsystem provides the building blocks for a user management system. Sessions can be either logged in or logged out and have an integer "userid" attribute. Logged in sessions can be made persistent.

Namespaces
Draco implements a collection of containers, accessible using the Python dictionary API, where variables can be stored. These containers are called namespaces. Each namespace has its own lifetime and binding. Variables can be transferred easily from one namespace to another. The following are examples of namespaces in Draco.

System Events
It is possible to install hooks for certain system events, like when a new session is generated or when the web application is starting up.

Tag Rewriting
It is possible to add an arbitrary function to a HTML tag in the template output. The function can modify the tags attributes.

Task Scheduling
Often in dynamic web sites there is a need for a certain function to be executed at fixed times. Draco has an integrated event scheduling service so there is no need for an external cron.

Image Size Detection
Draco uses the tag rewriting subsystem to append missing width= and height= attributes to <img> tags. These tags are essential for a user agent to render a page incrementally. Draco liberates the web site developer from the tedious job of keeping these parameters up to date. Images in the popular GIF, PNG and JPEG formats are supported.

Utilities
A collection of utility classes and function are provided to the web developer, including date/time classes, a form handling class and html/url coding functions.

Debugging and Profiling
Debugging and profiling of your code is supported directly by Draco and makes development more efficient.

Python standard library
Last but not least: Because Python is used as the scripting language, its very extensive standard library is directly available to your applications.