= Welcome! = ''Diva'' is a a lightweight web framework for Python that is built on top of [http://www.python.org/dev/peps/pep-0333/ WSGI] and integrated with the [http://genshi.edgewall.org/ Genshi] template engine. It also uses [http://babel.edgewall.org/ Babel] for internationalization and [http://pythonpaste.org/webob/ WebOb] for a more convenient abstraction on top of raw HTTP/WSGI. It provides support for declarative routing of requests to handler functions, the generation of URLs based on that routing, good integration of Genshi template rendering, simple declarative HTML form processing, automatic CSRF protection, solid internationalization and localization, easy upstream caching control and conditional request handling, a convenient stand-alone server for development, pervasive logging, and some more. == Big Fat Warning == The name ''Diva'' was chosen for its negative connotation (but also as an homage to a [http://www.flickr.com/photos/doesrails/128015501/in/pool-canadaonrails/ well-known web framework for Ruby]). Says [http://en.wikipedia.org/wiki/Diva#Negative_connotation Wikipedia]: > The term is often used with a negative connotation. This derives from the implication that a star who is a "diva" is arrogant, difficult to work with, high-maintenance, manipulative, fussy, highly strung, privileged and demanding. He or she does not believe the law and accepted rules of courtesy apply to him or her. Seriously: '''You probably don't want to be using this'''. It's a sandbox where I play with various ideas for modern web application development. Specifically, it doesn't make it easy to use a different template engine, it doesn't help you connect to a relational database (or any kind of database, for that matter), it doesn't provide an automatic admin interface or even scaffolding, it doesn't have fancy reusable widgets, it doesn't have an authentication and authorization system, and so on. Hell, it doesn't even handle server-side sessions for you. And it's probably never going to do or have those things. Also, I will be changing things, sometimes radically, without paying attention to preserving backwards compatibility. So why am I releasing this code in the first place? Because I don't like keeping spare time code to myself, and because it might serve as inspiration for others, or something like that. If you're looking for a lightweight and well-designed web application toolkit for Python that doesn't come with such a big fat warning, I'd recommend taking a good look at [http://werkzeug.pocoo.org/ Werkzeug] or [http://cherrypy.org/ CherryPy]. And of course there are the heavyweights such as [http://www.djangoproject.com/ Django], [http://pylonshq.com/ Pylons], [http://turbogears.org/ TurboGears], or [http://zope.org/ Zope]. == Documentation == Some very early and incomplete documentation: * ApplicationObject * RequestHandlers * UrlRouting * FormProcessing * ["I18nAndL10n"] * RequestFilters * ErrorHandling * ConfigOptions * DevelopmentServer == Examples == This framework is being used “in production” for my own personal sites http://www.cmlenz.net/ (based on [wiki:Divan]) and http://scratchpad.cmlenz.net/ (based on [wiki:Scratchpad]). Some examples are also included in the [source:trunk/examples repository]: * HelloWorld: A very simple example to get you started * [wiki:Geddit]: A minimalist reddit-style news system (requires SQLite) * [wiki:Divan]: A simple blogging system (requires [http://code.google.com/p/couchdb-python/ CouchDB], [http://www.crummy.com/software/BeautifulSoup/ BeautifulSoup] and [http://effbot.org/zone/element-index.htm ElementTree]) * [wiki:Scratchpad]: A pastebin service (requires [http://code.google.com/p/couchdb-python/ CouchDB] and [http://pygments.org/ Pygments]) == Acknowledgements == Much of this framework has been built on ideas and patterns extracted from the [http://trac.edgewall.org/ Trac] project, and many other parts have been inspired by other frameworks and libraries.