Link Search Menu Expand Document

Getting started

Tafferugli is a web application based on django.

Following, we report installation instructions for Ubuntu/Debian systems and docker. If you need help installing it on an other system, ask!


Install python3 and pip

apt install python3
apt install python3-pip

Install graph-tool libraries, necessary to do some analysis on community graphs.

# Change DISTRIBUTION to match yours
echo "deb [ arch=amd64 ] DISTRIBUTION main" >> /etc/apt/sources.list
apt-key adv --keyserver --recv-key 612DEFB798507F25
apt update
apt install python3-graph-tool python3-cairo

(Remember to change DISTRIBUTION with yours. It can be one of: bullseye, buster, sid, bionic, disco, eoan). You can find out by issuing the command lsb_release -cs.


git clone
cd tafferugli
virtualenv --system-site-packages -p python3 env
. env/bin/activate
pip install -r requirements.txt


You can configure some entries in the file Also, remember to change the default value of SECRET_KEY with any random string of that length (50 characters - no whitespaces).

By default, Tafferugli is configured to run locally and to use a SQLite database. However, SQLite does not manage concurrency very well, often returning the error “Database is locked”. For this reason and for performance, it is strongly recommended to setup and use another database backend (PostgreSQL or MySQL). The file already contains a default database configuration for PostgreSQL.

Set up the application

python makemigrations
python makemigrations twitter
python migrate
python createsuperuser
# Follow the instructions to create one admin user

Run the application

To run the application locally on your machine:

python runserver

On a different terminal, execute the background tasks that run the streamers and the metrics computation:

python process_tasks

If you want to have more control on the background processes, you can execute them in three different terminals (maybe in a screen session):

python process_tasks --queue streamers-queue
python process_tasks --queue operations
python process_tasks --queue metrics-computation

See for more information.


The application is currently being developed, with bugs fixed and features introduced quite often. If you want to upgrade to the latest version, navigate to the root folder, pull the most recent updates from github and upgrade the database schema in case it was modified:

git pull
python makemigrations twitter
python migrate


People from lab61 have provided the following “all-in-one” docker file. It is only for development purposes and it is not intended to be run in production.

FROM tiagopeixoto/graph-tool:latest
RUN yes | pacman -S python-cairo
RUN yes | pacman -S python-pip
RUN yes | pacman -S git
RUN yes | pacman -S sqlite
RUN pip install virtualenv
RUN mkdir /app
RUN git clone
WORKDIR tafferugli
RUN virtualenv --system-site-packages -p python3 env
RUN source env/bin/activate
RUN pip install -r requirements.txt
RUN python makemigrations
RUN python makemigrations twitter
RUN python migrate
# creating user with admin pass credentials
RUN echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '', 'pass')" | python shell
# creating a file to startup the application
RUN echo "#!/bin/bash" >
RUN echo "/usr/bin/python process_tasks &" >>
RUN echo "/usr/bin/python runserver" >>
# run the created .sh file
RUN chmod +x
CMD ./