django-cassandra-engine 0.2.3

Django Cassandra Engine - the Cassandra backend for Django

Homepage: http://github.com/r4fek/django-cassandra-engine

Platform: Pypi

Language: Python

License: BSD-3-Clause-Clear

Repository: https://github.com/r4fek/django-cassandra-engine

View on registry: https://pypi.python.org/pypi/django-cassandra-engine/


Django Cassandra Engine

Latest Version https://travis-ci.org/r4fek/django-cassandra-engine.svg?branch=master Downloads

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
URL (pypi): django-cassandra-engine

Installation

Recommended installation:

pip install django-cassandra-engine

Usage

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

    INSTALLED_APPS = ('django_cassandra_engine',) + INSTALLED_APPS
    

IMPORTANT: This app should be the first app on INSTALLED_APPS list.

  1. Also change DATABASES setting:

    DATABASES = {
     'default': {
     'ENGINE': 'django_cassandra_engine',
     'NAME': 'db',
     'TEST_NAME': 'test_db',
     'HOST': 'db1.example.com,db2.example.com',
     'OPTIONS': {
     'replication': {
     'strategy_class': 'SimpleStrategy',
     'replication_factor': 1
     }
     }
     }
    }
    
  2. Define some model:

    # myapp/models.py
    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)
    
  3. Run ./manage.py sync_cassandra

  4. Done!

Documentation

You can find documentation here.

веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей

GitHub Repository

r4fek/django-cassandra-engine r4fek/django-cassandra-engine

Django Cassandra Engine - the Cassandra backend for Django

Language: Python

Created: July 18, 2014 12:34

Last updated: March 26, 2015 04:55

Last pushed: March 25, 2015 21:42

Size: 1.2 MB

Stars: 40

Forks: 16

Watchers: 10

Open issues: 6

Top Contributors

Rafał Furmański Alex Meng

Releases

  • 0.2.3 - March 25, 2015 15:22
  • 0.2.2 - January 19, 2015 10:04
  • 0.2.1 - January 16, 2015 09:52
  • 0.1.8 - December 13, 2014 11:04
  • 0.1.7 - November 24, 2014 13:38
  • 0.1.6 - November 24, 2014 10:57
  • 0.1.5 - November 17, 2014 15:56
  • 0.1.4 - November 01, 2014 15:07
  • 0.1.3 - October 20, 2014 19:26
  • 0.1.2 - October 20, 2014 08:14
See all 18 releases

Related Projects

cassango
Django cassandra Engine, the cassandra backend for Django
Pypi - Python - DSDP - Published 3 days ago - 1 stars
djangoappengine 1.6.2
App Engine backends for Django-nonrel
Pypi - Python - BSD-3-Clause-Clear - Updated about 1 year ago - 235 stars
mcauth 1.0
Django backend for Minecraft.net authentication.
Pypi - Python - DSDP - Published almost 4 years ago - 2 stars
django-auth-kerberos 1.2.3
Kerberos authentication backend for Django
Pypi - Python - MIT - Updated about 2 months ago - 3 stars
django-shop-payer-backend 0.1.7
Payment backend for django SHOP and Payer.
Pypi - Python - MIT - Updated about 1 month ago
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей