Karrigell-3.0 released

Pierre Quentel quentel.pierre at wanadoo.fr
Sat Jun 20 09:44:42 CEST 2009


Hi there,

I am glad to announce the version 3.0 of the Python web framework
Karrigell

Karrigell has been around since 2002 and after numerous versions,
until 2.4.0 last year, it needed a complete rewriting. Some modules
had been written long ago, using out-of-date patterns ; the global
architecture needed cleaning up, to replace an accumulation of modules
added one release after the other ; most important, the previous
versions were unable to run reliably in a multithreaded environment,
which was a serious limitation for professional web developement

The decision was taken more than one year ago to rewrite almost
everything, while stricking to the same guidelines of simplicity for
the programmer and administrator :
- no configuration needed to get started : just unzip the package and
run "python Karrigell.py" to start the built-in web server
- URLs match scripts in the file system
- no imposed ORM, templating engine : all you need to know is Python
and HTML, plus a few built-in names for access to environment, form
data, etc
- the most usual tasks in web programing (sessions, user management,
redirection, etc) are accessible though built-in functions and
exceptions with a very intuitive syntax : Session() returns the
session object, Login() checks if a user is logged in and redirects to
a login page otherwise, "raise HTTP_REDIRECTION, url" redirects to the
specified url, etc
- clear debugging info
- a choice between a variety of coding styles : while the recommended
way is to use "Karrigell services" (Python scripts with the whole
logic of a web application in one script), other options are possible,
including a PHP-like format with Python code inside HTML markup

The most efficient and flexible way to run Karrigell is to use the
built-in multithreaded or multi-process web server ; for Windows user,
an exe file is available and allows running the framework from a USB
key on any machine, even if no Python interpreter is installed. The
built-in server has been tested by hundreds of users on all possible
configurations, it is robust, reliable and fast enough for 99% of web
sites

Of course, it can also be integrated to other web servers, with a
special effort on Apache integration (CGI mode, mod_python) ; you can
also configure your server to serve static files and proxy the
requests to the built-in server

Karrigell does not impose anything on database choice : since scripts
are pure Python, any db engine with a Python API can be used, either
directly or through an ORM like SQLAlchemy. All template engines are
also supported

Though it's an almost complete rewriting, the syntax remains almost
100% compatible with previous versions. Migrating from 2.x to 3.0
should be easy (much easier than from Python 2.x to 3.0). The two main
changes, introduced for multithread support, are relative to :
- relative paths in the file system : in previous versions, they were
converted to absolute path relative to the script's path ; in version
3.0, they must be converted by a built-in function REL()
- import of user-defined modules : instead of the standard Python
statement "import foo", the syntax is now foo = Import("foo")
A tool to detect potential migration issues in provided in the package

I thank all the people on the Karrigell group who helped by their
advices, suggestions, support and code

Enjoy !
Pierre


More information about the Python-announce-list mailing list