[Twisted-Python] python-twisted-akonadi and akonadi-gtk

Stephen Kelly steveire at gmail.com
Tue Oct 13 10:42:03 EDT 2009


Twisted is a framework for event driven applications. Typically client-
server architectures can be implemented with Twisted. Existing servers and 
clients exist for a long list of protocols and communication devices 
including HTTP, SSH, and notably for my purpose, IMAP and UNIX sockets. It 
provides an event loop, and asynchronous Deferred objects which are similar 
to KJob objects.


Akonadi is a cross platform PIM (personal information management) framework 
developed as part of the KDE4 platform. The goals of Akonadi include

* Isolating user applications handing PIM data such as emails, contacts, 
notes etc from the protocols used to access or store that data (IMAP, POP, 
Maildir, Groupware, vcards, etc).
* Provide a single point of storage (actually a cache) of PIM data 
accessible and manipulatable by any application written in any language on 
the target platform.


Akonadi is designed as a client/server architecture. The server is written 
in Qt/C++, and we already have one client library  for interfacing with the 
server written in C++ using the KDE platform. Notifications of changes to 
data are transmitted over D-Bus, and the actual data is transferred over a 
local socket (on Unix. On windows it's a named pipe). The protocol used for 
communication is IMAP with some non-standard extensions.

And so the purpose emerges :).

I have started an Akonadi client library written in python using twisted-
imap with some extensions on top of it for Akonadi specific functionality. 
The code currently lives here:


There is the twisted-akonadi library a gtkAkonadi library containing some 
high level classes for PyGtk applications and a simple email reader and 
addressbook written in pygtk. Because Akonadi keeps everything in sync, you 
can change items in a KDE application, the gtk application, or the django 
application, and the other two will be instantly updated with the change.

I've blogged about it twice already here:
* http://steveire.wordpress.com/2009/10/09/holy-grail-no-thanks-weve-
* http://steveire.wordpress.com/2009/10/13/cross-platform-akonadi-video/

As you can see, this is only a proof of concept of the project. The aim is 
to create a library which feels pythonic and natural to use for twisted 
users. If you think I've started in the wrong way, or you have ideas for 
ways this API could be used, please let me know. I've just started with 
twisted, so I've probably not found some stuff which would make this task 

Additionally, if you would like to contribute to the project, that would be 
very welcome. :)

If you find the ideas here interesting and want to know more, the Akonadi 
developers are in #akonadi on Freenode and kde-pim at KDE.org, and I am 
already in #twisted.

It isn't quite a twisted success story yet, but I think it has the potential 
to become one.

All the best,


More information about the Twisted-Python mailing list