Introduction

Here is a collection of semantic resources in order to ease the implementation of semantic Django web apps. Why? Just because data is more important than code and if you store, manipulate, give access to your data in a standard way you'll be able to interact with other website as part of the Giant Global Graph. Isn't it fun?

Update: The current goal is to create a semantic contrib in django which handle both Semantic Web (RDF, AtomPub, etc) and Open Stack (OpenID, OAuth, etc). Do not hesitate to contact me if you're interested in it.

Quick links: OpenID, OAuth, Microformats, RDF, FOAF, REST, Atom and Snippets.

OpenID

django-openid
Views and middleware for enabling your Django application to act as an OpenID consumer.
The initial implementation by Simon Willison.
django-authopenid
Django authentification application with openid using django auth contrib. This application allow a user to connect to you website with legacy account and/or openid url.
A bit hard to integrate and to keep it as a generic app but that's great that Benoît Chesneau had done this work.
django-openid-auth
The django-openid-auth Django package adds support for OpenIDs to be used as user authentication by seamlessly integrating into the built-in django.contrib.auth framework and optionally into the third-party django-registration package.
I don't know why there are two distincts projects, I had only tried the first one.

OAuth

django-oauth-plus
An easy way to build your own OAuth server implementation with Django.
That's difficult to evaluate my own work, clone the mercurial repository there are complete examples. The -plus version uses the much more mature python-oauth2 lib.

Microformats

django-microformats
This is a pluggable application you can use to make microformats with Django framework.
It seems that there is only the hCard one which is implemented.

I had done some stuff with mixin and hCalendar, I'll see if I can extract/reuse that. Don't forget to check the XFN snippet below too.

RDF

django-rdf
Django-RDF is an RDF engine implemented in a generic, reusable Django app, providing complete RDF support to Django projects without requiring any modifications to existing framework or app source code, or incurring any performance penalty on existing control flow paths.
I hadn't found the time to try this yet, I'm a bit scared by the pluggable aspect and the impact on performances.
djubby
Djubby is a Linked Data frontend for SPARQL endpoints for the Django Web framework, adding a Linked Data interface to any existing SPARQL-capable triple stores.
Impressive list of features, expose both HTML, RDF and a SPARQL endpoint.
django-4store
django-4store is a small Django application that makes developing apps with the 4Store RDF database easier.
A well documented and tested project.

FOAF

django-foaf
The purpose of this module is to free user's social graph by the use of the foaf format. A user creates his profile in the editor, including relations, or directly imports his foaf file. The generated user profile will be available from the web as a foaf file.
Still in beta and not updated for a while but interesting ideas.
Python FOAF Generator
Note that the user parameter is a Django User model with a custom UserProfile.
Useful generator from Leah Culver.

REST

django-piston
A mini-framework for Django for creating RESTful APIs.
Not anymore maintained as of 2011 but a community fork is currently discussed. A very good base used by a lot of people, by Jesper Noehr.
dj-webmachine
webmachine provides a REST toolkit based on Django. It’s heavily inspired on webmachine from Basho. dj-webmachine is an application layer that adds HTTP semantic awareness on top of Django and provides a simple and clean way to connect that to your applications’ behavior. dj-webmachine also offers you the possibility to build simple API based on your model and the tools to create automatically docs and clients from it
Quite different from Django's philosophy but not tightly coupled to it, it can be an advantage, by Benoît Chesneau
django-rest-framework
Django REST framework is a lightweight REST framework for Django, that aims to make it easy to build well-connected, self-describing RESTful Web APIs.
Quite new but with very good documentation and online example APIs for testing, by Tom Christie.

Atom

django-atompub
This project intends to be a full implementation of the Atom Syndication Format (RFC 4287) and Atom Publishing Protocol for the Django web framework.
Excellent work from James Tauber, the APP part is still missing.

Snippets

HttpMethodsMiddleware
This middleware allows developers to "fake" browser support for HTTP methods. Even though most modern browsers only support GET and POST, the HTTP standard defines others. In the context of REST, PUT and DELETE are used for client interaction with the server.
The most useful snippet if you'd like to handle PUT and DELETE method the right way from a browser.
XFN Form Field
This is a newforms field for XFN relationships.
Title says all, it probably deserves an appropriated model field too (don't forget to handle choices with integers in this case). See below.
Links with XFN (and Validation) & JavaScript XFN Assist
Trying to tackle the XFN issue with my uptime bouncing around like a small puppy meant I was left to my own devices and what I could remember.
Alexander Stanley eventually tries to make XFN a friend. Great work!
View dispatch based on HTTP verb
Helper utility for passing control to different views based on the HTTP method.
Well known trick, thanks Jacob Kaplan-Moss for your example in RESTful Web Services book (a must-read). Don't forget to check snippet 437 too.

Why this site?

I'm working on mySemID project which needs a lot of semantics, here is the result of my personal researches/implementations in the Django sphere. I hope it helps!

Who's behind this?

I'm just a geek, interested in semantic web and web development, actually I'm a Django freelance developer and Python addict too. You can find more informations on my blog (in French).

Want to discuss?

Just drop me an email. Suggestions, corrections, discussions welcome.

More resources?

I probably missed a lot of projects, do not hesitate to let me know. Really.