A simple but full-featured web framework in Python
Project description
- Karrigell is a simple, lightweigth and full-python web framework, including a
web server and an SQL database (gadfly). All you have to do is download, unzip and do “python Karrigell.py” : no configuration headaches. It allows execution of Python scripts and of pages mixing Python and HTML (PHP-like) ; easy handling of authentication and sessions ; dbStorage, a Python objects / database interface working with gadfly or SQLite (take a class instance, open a database and do database.write(object), no SQL syntax required) ; building pages from components. Powerful post-mortem debugger with script listing, data browsing. Complete documentation and many demos included The main changes in this version are : - a change in the default web server : instead of the SocketServer-based server, the one used when running “python Karrigell.py” is now an asyncore-based, asynchronous web server. From the measures I have made it it something like 30% faster than the previous one, and seems very stable. The SocketServer-based server can still be used, running “python Karrigell_SocketServer.py” - the If-Modified-Since header is now handled for static pages (patch by Luca Montecchiani) - the Content-Length header was missing - a new module called HTMLTags has been added, it can be used to generate HTML with Python functions. For instance, print A(‘Go there’,href=”foo.py”) generates the HTML <A HREF=”foo.py”>Go there</A> - the Component features present in the previous versions has been removed. The concept of ready-to-use pieces of code still makes sense to me, but the implementation was ugly and bugged (trying to include components in other components failed). Perhaps it will come back in a future version, if I can find better ways to implement it - the small, all-Python KirbyBase database has been included in the package, with some demos already running with it (more support will be added in the next versions) - changes in Template.py to make the namespace for script execution cleaner As usual, comments and bug reports will be welcome !