¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>
Amplee

I've been wanting a general purpose Atompub server to play with for a while and was hoping to find something written in Python. After more searching than I expected I found amplee, which I've been very impressed with so far. Setup was a little tricky, mostly because the docs aren't particularly mature for the simple case of getting a stock Atompub server off the ground. Below is a rundown of my configuration in hopes it will be useful to others.

The first step was to get amplee. Thanks to easy_install, this was: easy_install -U amplee

The current amplee documentation is optimized for a static service description provided in a configuration file. Mine can be found here. One of the neatest things about amplee is that it comes stock with Amazon S3 support. In general I find the ins and outs of database maintenance less interesting, so I decided to sign up and give it a try. Pointing amplee at my S3 account involved adding two id strings and a name for the "bucket" to store my information in to the configuration file.

Next, I put together a simple startup script that can be found here. Amplee doesn't do http handling. Instead, it provides convenience methods for creating objects that can be used by various http packages like cherrypy or any of the myriad wsgi compliant modules. For now I've gone with straight cherrypy, but I'd like to experiment with plugging a wsgi version of this into packages like Twisted in the future.

An aspect of amplee that initially confused me was the need for custom handlers for Atom entry content. One improvement that could be made to the package would be the inclusion of more generic handlers that would get rid of the need for this custom code. For now I've created commit.py with what I believe is the simplest code that does what I want: basic uuid generation and slug handling, and updating feeds when entries are posted to collections.

To handle boot-time startup of the amplee service I put together a shell script that I installed on my Ubuntu box with: sudo cp boot.sh /etc/init.d/tvachon.info.sh sudo update-rc.d tvachon.info.sh defaults 90 Unfortunately the script is pretty fragile at the moment and doesn't provide a good mechanism for restarts, a problem I hope to tackle soon.

Technorati Tags: , , , ,