Django Scylla
Project description
Django Scylla - the Cassandra & ScyllaDB backend for Django
Django-scylla makes possible to connect your Django app to Cassandra or ScyllaDB and use native Django ORM as with any other relational database backend.
Discord: https://discord.gg/pxunMGmDNc
Sponsors
Help support ongoing development and maintenance by sponsoring Django Scylla.
Installation
Recommended installation:
pip install django-scylla
Basic Usage
-
Add
django_scylla
toINSTALLED_APPS
in yoursettings.py
file:INSTALLED_APPS = ('django_scylla',) + INSTALLED_APPS
-
Change
DATABASES
setting:DATABASES = { 'default': { 'ENGINE': 'django_scylla', 'NAME': 'db', 'TEST_NAME': 'test_db', 'HOST': 'db1.example.com,db2.example.com,db3.example.com', 'OPTIONS': { 'consistency_level': ..., 'load_balancing_policy': ..., 'retry_policy': ..., 'request_timeout': 10, } } }
-
Define some model:
# myapp/models.py from django.db import models class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30)
-
Connect to ScyllaDB and create a keyspace.
-
Run
./manage.py makemigrations && ./manage.py migrate
-
Done!
License
Copyright (c) 2021-2022, Rafał Furmański.
All rights reserved. Licensed under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_scylla-0.0.10.tar.gz
.
File metadata
- Download URL: django_scylla-0.0.10.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.19.0-23-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e3c951c0ff9de04c4667757cd9936aee5a5c4660bee9a9ae344f805aaeec3ed |
|
MD5 | 9d4830ea937826c90435e326f0120d1c |
|
BLAKE2b-256 | b3561e442eb1d36ea0667c9cf3d37c3f0c1c29b4eb288ccfffb022c8e2c9649b |
File details
Details for the file django_scylla-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: django_scylla-0.0.10-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.19.0-23-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b10d00afc7e66c52f5d88e78041e5e3c4e0468ce8be644b95a63bc98efe82cea |
|
MD5 | ae0028f3c49fc304573db718c5f18227 |
|
BLAKE2b-256 | 776b4417868dbab5e50c63545c76e3c0636783440c9f9a097e63ac582196c3d3 |