NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter



django: All content tagged as django in NoSQL databases and polyglot persistence

Getting Started with MongoDB and Django

Another getting started quick guide with Django and MongoDB using MongoKit and django-mongokit. Just in case you need a more general introduction, you could also check Python, Django and MongoDB and MongoDB for Python or Ruby. Your Choice.


Presentation: Persistent graphs in Python with Neo4j

These are the slides and video of Tobias Ivarsson (@thobe) presenting at PyCon on Neo4j with a Python flavor.

I really liked this slide in particular:

Python code starts at slide 23. A couple of my comments:

  • I am not really sure I understand how the Python scripts are accessing the Neo4j storage when using CPython (Neo4j is supposed to run in a JVM)
  • traversals in graph databases are somewhat synonymous to queries
  • having the traversal implemented like classes extending neo4j.Traversal doesn’t really look Pythonic
  • Django and Neo4j can work together

Python, Django and MongoDB

Interested in Python, Django and MongoDB? Then I hope you’ll find these posts interesting:

And then there is this fresh screencast from Kevin Fricovsky talking Django and MongoDB integration. You can read about it ☞ here, but as a quick summary, the screencast will introduce you to mongoengine and then using Django-Mumblr, a NoSQL-based blog engine it will dive deeper into the details of Django and MongoDB integration.

Update: Just found a couple of more MongoDB Django tricks that you may find interesting.

The first one is a solution that provides access to MongoDB document _id’s from Django templates. The ☞ solution is based on a custom Django filter and using it as in {{ object|mongo_id }}

I find the solution pretty odd, not to mention that using a filter for accessing such an important document information seems convoluted. I’d much prefer to have the _id accessible directly on an object through either a field or at least a special property. Behavior for an unsaved document might be as simple as returning None or raising an exception.

The second trick fixes a problem with using Django’s FileWrapper while working with MongoDB’s GridFS. I’d probably be tempted to call this a bug, so before getting it fixed you can read the details ☞ here.

Usecase: NoSQL-based Blogs

Aside Twitter applications, blogs are another darling of NoSQL projects. So, I’ve put together a list of NoSQL powered blog projects.



A Rails and CouchDB blog. Code on ☞ GitHub


A CouchDB-based blog built in “one day” with Django (nb so far I couldn’t find the source code, so any leads are appreciated).



A simple blog built using neo4j, jo4neo and Stripes. You can read more about it ☞ here and get the code from ☞ Google code.

Couple of comments:

  • I don’t really like the fact that the model is neo4j aware, but that’s similar to what JPA is doing too
  • I like the indexing annotation though, but I am not sure if it uses neo4j Lucene full text indexing



A cli-application blog built using neo4j. Code available on ☞ Google code.




A lightweight blogging engine written in C++ and using MongoDB. Code available on ☞ GitHub


Update: thanks to the comments, I have added two more NoSQL-based blog engines.


Django-Mumblr is a basic Django tumblelog application that uses MongoDB. Source code can be found on ☞ GitHub


mmmblog is a blog engine based on Rails, mongomapper and MongoDB, providing feeds, OpenID comments and a simple admin interface. Code is available on ☞ Gitorious

I am pretty sure there are more out there, so please send them over!

Bringing NoSQL to the people: Now Django

Django is one of the most popular Python frameworks, the one that Google picked to integrate with their Google App Engine PaaS. Thanks to a GSOC project, Django has added now ☞ support for multiple databases and that includes NoSQL stores:

Multiple TYPES of databases. This is the one I’m most excited about. This is going to enable people to use some of the NoSQL databases […]

The multi-database support is right now only in the development trunk — documentation can be found ☞ here — so it might take a while until a Django release will include it and I’m not sure this feature will be backported. But this is definitely just another validation for the NoSQL world.

As far as I know, even before this announcement, there were some efforts to integrate NoSQL solutions with Django and the one I know about is ☞ Neo4j for Django:

The way that the integration between Django and Neo4j is implemented is in the Model layer. Since Neo4j does not have a SQL engine it would not have been efficient or practical to implement the support as a database layer for Django. Google did their implementation in the same way when they integrated BigTable with Django for App Engine. This means that there will be some minor modifications needed in your code compared to using PostgreSQL or MySQL. Just as with BigTable on App Engine, you will have to use a special library for defining your models when working with Neo4j, but the model definition is very similar to Djangos built in ORM.

Now, you might wonder why I do believe that getting NoSQL support in (popular) frameworks is an important step. For the last year or so, the NoSQL stores have been under scrutiny for their technical value and I’d say that, by now, this phase is almost over. Next came the business validation and there are good signs that NoSQL world sees some traction there too.

So, what is left? The simple answer is bringing NoSQL to the people. And by this I mean making it easy to adopt one or the other NoSQL solution and having seamless and standardized integration with existing frameworks and tools. Making it easy to switch from classical RDBMS based solutions to NoSQL solutions or even hybrid SQL-NoSQL solutions is both important and critical for adoption. Ease of adoption will bring us a lot of new use cases and that will make further adoption even easier. And that is the guarantee for a bright NoSQL future.

Update: Even if there were ways to use NoSQL solutions with Django (take for example this intro to using CouchDB with Django), I think the new integration layer will make things feel more natural. I read that here is already a CouchDB Django database adapter and also a demo of using MongoDB with Django. And I bet more will come, so keep an eye on our list of NoSQL libraries.

An Introduction to Using CouchDB with Django

CouchDB is one of the more exciting projects—measured in number of semi-plausible day dreams it has inspired—I’ve run into in the past year. It is an ideological rival to relational databases, and instead of being focused on highly detailed schemas (long ints, varchars of length 25, and blobs of binary data, oh my) it deals in documents. These documents may be comprised of identical fields, but may also contain dissimilar fields, allowing the same flexibility as Google’s BigTable. Beyond that, CouchDB brings some other unexpected goodies to the table like document versioning.