eTraGo is designed as a Python package therefore it is mandatory to have Python 3 installed. If you have a working Python3 environment, use pypi to install the latest eTraGo version. We highly recommend you to use a virtual environment. Use following pip command in order to install eTraGo.

$ pip3 install eTraGo

Using a virtual environment

Before installing eTraGo, you create a virtual environment (where you like it) and activate it:

$ virtualenv venv --clear -p python3.8
$ source venv/bin/activate
$ cd venv

Inside your activated virtual environment you can install eTraGo with the pip command, as previously explained.

Linux and Ubuntu

The Package eTraGo is tested with Ubuntu 16.04, 18.04, 20.04 and 22.04 inside the virtual environments of virtualenv. The installation is shown above.

Windows or Mac OSX users

For Windows and/or Mac OSX user we highly recommend to install and use Anaconda for your Python3 installation. First install Conda including python 3.8 or higher version from and open an anaconda prompt as administrator and run:

$ conda config --add channels conda-forge
$ conda create -n etrago_env python=3.8
$ conda activate etrago_env
$ pip install eTraGo

The full Documentation can be found on this page . We use Anaconda with an own environment in order to reduze problems with Packages and different versions on our system. Learn more about Anacona environments.

Setup database connection

The eTraGo module db gives you a python SQL-Alchemy representations of the OpenEnergy-Database(oedb) and access to it by using the oedialect, which is a SQL-Alchemy binding Python package for the REST-API used by the OpenEnergy Platform (OEP).

In order to connect eTraGo via the oedialect with the oedb you have to create an account at You can name the ‘db’ argument of the ‘args’ of the etrago.appl.etrago() as you wish. Once the etrago.appl.etrago() is executed you will be asked to enter how you want to connect to which database. If you want to use the oedialect enter the following connection parameter. For <username> and <token> you have to take your credentials which you obtained by registering at

Your API access / login data will be saved in the folder .etrago_database in the file config.ini. Consequently, in the config.ini you can also change your connection parameters or add new ones. In the following you can see how the config.ini looks like when you use the oedialect, a local postgresql database or the old psycopg2 developer connection.

Once you have created a connection (which is saved in the config.ini) you do not have to enter the connection parameter again. The software will take the connection parameter which corresponds to the entry at the ‘db’ argument.

oedialect connection

dialect  = oedialect
username = <username>
database = oedb
host     =
port     = 80
password = <token>

Local database connection

username = YourOEDBUserName
database = YourLocalDatabaseName
host = localhost or
port = 5433
pw = YourLocalPassword

Old developer connection

username = YourOEDBUserName
database = oedb
host =
port = 5432
pw = YourOEDBPassword