Tarantool database backend for Django
Project description
Django Tarantool database backend
⚠️ Fork Notice
This package is a fork of django-tarantool by @artembo.
Changes in this fork:
- Django 5.0+ support
Installation
Install Tarantool v2.2+. See the installation manual for your OS here
Make a database directory and run Tarantool instance there:
$ mkdir ~/project_db
$ cd ~/project_db
$ tarantool
You will see the Tarantool interpreter. Initialize DB configuration and create password for admin
tarantool> box.cfg({ listen = 3301 })
tarantool> box.schema.user.passwd('admin', 'password')
To get started with django-tarantool, run the following in a virtual environment:
pip install django-tarantool
Add DATABASES config of your Tarantool into settings.py
DATABASES = {
'default': {
'ENGINE': 'django_tarantool.backend',
'HOST': '127.0.0.1',
'PORT': '3301',
'USER': 'admin',
'PASSWORD': 'password',
'CONN_MAX_AGE': 3600,
}
}
Mind using CONN_MAX_AGE param as very important. It allows to keep connection opened for the specified time in seconds. Otherwise, Django will open the connection to the Tarantool instance on each request and close after it, which increases the request latency.
Run migrate as usual:
python manage.py migrate
Run Django development server:
python manage.py runserver 0:8000
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tarantool_reborn-0.1.0.tar.gz.
File metadata
- Download URL: django_tarantool_reborn-0.1.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2496266579352674bb1c54bb0c8d7d7dbb6f23af8e6572557ae26ce708a89db
|
|
| MD5 |
e249fe2f570493982b98962538cdb717
|
|
| BLAKE2b-256 |
e4787565a862315ab642c420701cfc228d737d6dac0e78fcefe0595cbd5155be
|
File details
Details for the file django_tarantool_reborn-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_tarantool_reborn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99bc0f512ee0379e215f6c8da3ec451336f778f438445b1cd3b90b4da76386be
|
|
| MD5 |
5ad5ec661612a2a0c2a0a44a85e5fc6f
|
|
| BLAKE2b-256 |
29cf3475f6b4d21e22cec9b8ea9837e237e9b8531296163d36fcfb5588176349
|