A framework for WebProgramming.
- stable version for Apache 1.*
- stable version for Apache 2.*
- The Apache Software License, Version 1.1
- Apache 1.3, Apache 2.0
- Python versions
- Python 1.5.2, 1.6, 2.0, 2.1, mod_python 3.* requires 2.2.1
Linux and Windows. RPMs available.
mod_python can be used to develop fast and small web tools and applications, and as part of larger custom application frameworks. It provides an object publishing mechanism similar to (but much simpler than) Zope, and a very clean mapping from URLs to functions. This makes it especially suitable for building web-accessible libraries using HTTP GET/POST as function call serialization.
See the mod_python [http://www.modpython.org/pipermail/mod_python/ mailing list].
ModPython Compatible Web Application Frameworks
ModPython now has built-in support for cookies and sessions, PSP templates, etc., and a CGI handler for compatibility with regular CGI python scripts.
Web application frameworks that support multiple kinds of deployments including ModPython:
[http://www.python.org/pypi?:action=display&name=WebStack&version=0.2 WebStack] aims to provide a common API regardless of the underlying server or framework environment (be it ModPython, CGI, ["Webware"], etc.).
["Quixote"] is a web application framework that has a ModPython handler.
["Albatross"] applications can be deployed to ModPython or CGI.
["Karrigell"] is meant primarily for running small standalone web applications, but now has a ModPython handler as well.
["Aquarium"] is a MVC web application framework using [http://cheetahtemplate.org Cheetah] for templating with some resemblance to Struts and a ModPython WSAdaptor.
Frameworks designed specifically for ModPython:
[http://jotweb.tummy.com/ JOTWeb] also separates the view and the model in part by using TAL templates.
[http://www.djangoproject.com/ Django] runs in stand-alone mode for development purpose, but relies on ModPython for production.
mod_python provides a similar API to mod_perl, allowing low-level access to Apache's request handling mechanisms.
Session, Identification and Authentication
mod_python 3.1.3 and later provides support for server-side sessions with memory or dbm-based storage. It also supports session locking. For earlier versions, JonsPythonModules implement session management as well as templating and database pooling. mod_python has a very straightforward and flexible system for basic authentication, allowing access rules to be configured at the module and function level.
Scripts remain in memory between page loads. The Python interpreter can be configured to run per-site or per-directory, allowing the scope of the persistence to be limited as necessary.
None. mod_python provides no built-in templating system, although it is not difficult to incorporate one.
mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.
mod_python has been "donated" to the Apache Software Foundation. Here is author Gregory Trubetskoy's official statement as of Thursday, Sept. 12, 2002:
It is my pleasure to announce that Mod_Python has been donated to the Apache Software Foundation, and is now a subproject of the httpd server project (see http://httpd.apache.org/).
I am grateful to ASF for accepting this donation and committing resources to further the support of Mod_Python. I believe that this action will advance the development of Mod_Python, resulting in an ultimately better and more popular tool for Python developers. I also believe it will serve to better position Python as a language of choice for web development, a need that has been expressed by many.
There are no implications to the current Mod_Python users - the license is the same with the sole difference in that the copyright belongs to ASF now.
As a consequense of the donation, the CVS repository is now hosted on cvs.apache.org. Do not use the SourceForge repository anymore, it will soon be removed.
There will also be website and mailing changes, but the details are still being finalized and will be announced when ready.