Dependencies:
-------------
* python3 (tested in python3.5, python3.6) https://www.python.org/downloads/source/, PSF-2
https://www.python.org/download/releases/2.0.1/license/
https://www.gnu.org/licenses/license-list.html.en#Python
* python3-ipy aka dev-python/ipy, 3-clause BSD
https://github.com/autocracy/python-ipy/blob/master/COPYING
https://www.gnu.org/licenses/license-list.html.en#ModifiedBSD
* python3-dateutil aka dev-python/python-dateutil, Apache2
https://github.com/dateutil/dateutil/blob/master/LICENSE
https://www.gnu.org/licenses/license-list.html.en#apache2

Dependencies for REST API:
--------------------------
* python3 (tested in python3.5)
* flask aka dev-python/flask, 3-clause BSD
https://github.com/pallets/flask/blob/master/LICENSE
https://www.gnu.org/licenses/license-list.html.en#ModifiedBSD

REST API accesible via Apache:
------------------------------
* apache2
* libapache2-mod-wsgi-py3 aka www-apache/mod_wsgi, Apache2
https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/LICENSE
https://www.gnu.org/licenses/license-list.html.en#apache2

* Deployment to Apache

See http://flask.pocoo.org/docs/1.0/deploying/#deployment

Create /var/www/html/rest_tor_history.wsgi with the following content:

{{{
 import sys
 sys.path.insert(0, '/path/to/the/application/rest.py')

 from rest import app as application
}}}

Modify Apache host as follows:

<VirtualHost *>
    ServerName example.com

    WSGIDaemonProcess {rest_tor_history} user={www-data} group={www-data} threads=5
    WSGIScriptAlias / /var/www/html/rest_tor_history.wsgi

    <Directory /var/www/html>
        WSGIProcessGroup rest_tor_history
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

Dependencies for testing-only:
------------------------------
* beautifulsoup4 (https://www.crummy.com/software/BeautifulSoup/) aka python3-bs4 aka dev-python/beautifulsoup, MIT/Expat
https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/LICENSE
https://www.gnu.org/licenses/license-list.html.en#Expat
Copyright (c) 2004-2016 Leonard Richardson
* python3-flask-testing aka dev-python/flask-testing, 3-clause BSD
https://github.com/jarus/flask-testing/blob/master/LICENSE
https://www.gnu.org/licenses/license-list.html.en#ModifiedBSD
