# Django Tarantool database backend
[![Build Status](https://travis-ci.com/artembo/django-tarantool.svg?branch=master)](https://travis-ci.org/artembo/django-tarantool)

## Installation


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

Make a database directory and run Tarantool instance there:

```shell script
$ 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')
```

Install tarantool-python with dbapi2 on board.  
Now it is hosted at https://github.com/artembo/tarantool-python/tree/dbapi2 

```
pip install git+https://github.com/artembo/tarantool-python@dbapi2 
```

To set up django-tarantool enter in the command line 
```
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',
    }
}
```
