Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Django Cassandra Engine - the Cassandra backend for Django

Project Description

django-cassandra-engine is a database wrapper for Django Framework. It uses latest Cqlengine which is currently the best Cassandra CQL 3 Object Mapper for Python.

License:2-clause BSD
Keywords:django, cassandra, orm, nosql, database, python


  • cassandra
  • cqlengine
  • django-nonrel
  • djangotoolbox


  • complete django integration
  • working syncdb command
  • support for creating/destroying test database
  • accept all cqlengine connection options
  • automatic connection/disconnection handling


Recommended installation:

pip install django-cassandra-engine


  1. Add django-cassandra-engine to INSTALLED_APPS in your file:

    INSTALLED_APPS += ('django_cassandra_engine',)
  2. Also change DATABASES setting:

        'default': {
            'ENGINE': 'django_cassandra_engine',
            'NAME': 'db',
            'TEST_NAME': 'test_db',
            'HOST': ',',
            'OPTIONS': {
                'replication': {
                    'strategy_class': 'SimpleStrategy',
                    'replication_factor': 1
  3. Define some model:

    #  myapp/
    import uuid
    from cqlengine import columns
    from cqlengine.models import Model
    class ExampleModel(Model):
        read_repair_chance = 0.05 # optional - defaults to 0.1
        example_id      = columns.UUID(primary_key=True, default=uuid.uuid4)
        example_type    = columns.Integer(index=True)
        created_at      = columns.DateTime()
        description     = columns.Text(required=False)
  4. Run ./ syncdb

  5. Done!

Release History

Release History

This version
History Node


History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting