[mod_python] Mod Python, Webdav

Graham Dumpleton graham.dumpleton at gmail.com
Fri Nov 2 07:20:55 EDT 2007


On 02/11/2007, Martijn Moeling <martijn at xs4us.nu> wrote:
>
>
>
> Hi All,
>
> I use mod_Python as a backend for my browser based desktop. (think of it as
> a WebOs)
> It is used at several places for production and it works great.
>
> Basically it consists of a MySQL database and several .py modules with
> complete templating system for serving as a CMS too. the main goal hoever is
> to be able to build web base Apps which run side by side in a javascript
> based MDI so the browser window becomes a Desktop.
>
> One of the main things an OS should do is take care of storage. and I think
> webdav is the way to go, however I would like to store the data in the MySQL
> database.
>
> Whilst searching the net I found a lot of python related WebDAV stuff but
> since I just started thinking about using WebDAV, there just might be some
> of you able to point me in the right direction.
>
> Next Webdav is just another protocol 'over' http so using mod_python it
> should not be to hard to modify existing python libs for a webdav server to
> integrate with mod python, right? or is there anything out there being used
> by one of you guy's?
>
> Any tips, product names etc is highly appreciated!!

My personal opinion is that if one wants to use Python for webdav
stuff in the context of Apache, one would be better of developing a
custom Apache module that uses a bit of custom dispatch code, but
mainly employs SWIG bindings wrapping the internal Apache APIs, in
particular, SWIG bindings which wrap the existing public APIs for the
Apache mod_dav module.

By wrapping the Apache mod_dav module you have all the hard work done
for you and you don't have to worry about interpreting all the webdav
requests, but just implementing the callbacks which respond to the
request types.

For brief details of the Apache mod_dav C API, see:

  http://docx.itscales.com/group___m_o_d___d_a_v.html

Doing just this is something on my extended TODO list. Part of the
reason for implementing mod_wsgi was to in time break open the Python
interpreter management code to make it available to companion modules
such as a Python binding for Apache mod_dav. I have already started on
SWIG bindings for the main Apache API, but because I have other stuff
I need to get done first, haven't started looking at mod_dav in
particular yet.

Graham


More information about the Mod_python mailing list