Metadata-Version: 2.4
Name: django-tarantool-reborn
Version: 0.1.0
Summary: Tarantool database backend for Django
Home-page: https://github.com/artembo/django-tarantool
Author: Artem Morozov
Author-email: Artem Morozov <artembo@me.com>
Maintainer: Mikhail Solomin
License: MIT License
        
        Copyright (c) 2020 Artem Morozov
        Copyright (c) 2026 Mikhail Solomin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/whatdoimakeup/django-tarantool
Project-URL: Repository, https://github.com/whatdoimakeup/django-tarantool
Project-URL: Original Repository, https://github.com/artembo/django-tarantool
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tarantool>=0.7.1
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Django Tarantool database backend

⚠️ **Fork Notice**

> This package is a fork of [django-tarantool](https://github.com/origin/django-tarantool)
> by [@artembo](https://github.com/artembo).

**Changes in this fork:**

> - Django 5.0+ support

## Installation

Install Tarantool v2.2+. See the installation manual for your OS [here](https://www.tarantool.io/en/download/)

Make a database directory and run Tarantool instance there:

```bash
$ 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:

```bash
pip install django-tarantool
```

Add `DATABASES` config of your Tarantool into `settings.py`

```python
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:

```bash
python manage.py migrate
```

Run Django development server:

```bash
python manage.py runserver 0:8000
```
