Backend is written in Python. It requires Python 3.9 or newer. You will need Poetry version 1.2 or newer to install package and all the dependencies.

Preparing development environment#

Clone Github repo:

git clone

Install dependencies:

poetry install --with test,dev -E container

Changing development version configuration#

If you want to change the configuration of development version, the best way of doing so is through settings.local.yaml (inside settings directory). For example, following file would turn on debug-level logging, while ignoring log messages produced by some third-party libraries:

  LOGGING__root__level: 'DEBUG'
    - 'null'
    - 'null'
      - 'null'
    propagate: False
      - 'null'
    propagate: False

Running current development version#

Commands below assume that current virtual environment is active. You can spawn shell with activated virtual environment using:

poetry shell

Run migrations:

python migrate

Create cache tables:

python createcachetable

Create user:

python createsuperuser --username admin --email admin@example.invalid

Generate authentication token:

python drf_create_token admin

Run server:

python runserver

Kustosz API server will be available at You can use curl or httpx to communicate with it. See Frontend for instructions how to run development version of Kustosz frontend.

Running unit tests#

Running unit tests using currently installed Django version and Python version used to create active virtual environment is as simple as:


If you want to run unit tests against the matrix of all supported Python and Django versions, then run:

nox --non-interactive --session "tests"

This will work only if you have binaries for all of the Python versions (e.g. python3.9 and python3.10). You can use pyenv or asdf to install them.