Development environment

To start with developing on Zou you need Python installed (2 or 3) and a Postgres database instance.


To run Postgres we recommend to use Docker (it's simpler and it won't impact your local system):

sudo docker pull postgres
sudo docker run postgres \
    --name postgres \
    -p 5432:5432 \
    -e POSTGRES_PASSWORD=mysecretpassword \
    -d postgres

Key-value store

To run Redis we recommend to use Docker again:

sudo docker pull redis
sudo docker run \
    --name unit-redis \
    -p 6379:6379 \
    -d redis


For video operations, it is required to have FFMPEG installed. For that, simply install it through your OS package manager:

sudo apt-get install ffmpeg

Source and dependencies

Then get Zou sources:

git clone

Create a virtual environment with mkvirtualenv:

pip install virtualenvwrapper
mkvirtualenv zou
workon zou

Install dependencies:

pip install -r requirements.txt 

Init data

Create a database in postgres named zou with user postgres and password mysecretpassword. Then init db:

python zou/ clear_db
python zou/ init_db
python zou/ init_data

Create a first user:

python zou/ create_admin

Run server:

FLASK_DEBUG=1 flask run

You can now use the API by requesting http://localhost:5000.

Event server

To run the Server Events server used to update the web GUI in realtime, use the following command.

gunicorn --worker-class gevent -b -w 3 zou.event_stream:app


To run unit tests we recommend to use another database. For that set the DB_DATABASE environment variable:

DB_DATABASE=zou-test py.test