The oemof database extension
Project description
An oemof extension to use the oemof related postgis database.
To use this extension you have to have access to the oemof postgis database.
The oemof code will be released in early 2016 but you can try this extension already with the feedinlib. If you are interested to join the oemof database project please contact us.
Installation
Clone the repository to your local system.
git clone git@github.com:oemof/oemof.db.git
Then you can install it using pip3 with the -e flag.
sudo pip3 install -e <path/to/the/oemof.db/root/dir>
Configuration
As the purpose of this package is to facilitate usage of the oemof database, it needs to know how to connect to this database. Being part of oemof, oemof.db looks for this configuration in the file config.ini in a directory called .oemof in your home directory.
To configure database access this file has to have at least one dedicated section containing the necessary options, like this:
[postGIS] username =
username under which to connect to the databasedatabase =name of the database from which to readhost =host to connect toport =port to connect topw =password used to connect with the given username (OPTIONAL)
The section is assumed to be named postGIS by default, but you can name it differently and have multiple sections for different databases if the need arises.
The password is optional. If you don’t want to store the password in the config.ini, you may store it using the keyring package, which is a dependency of oemof.db, like this:
>>> import keyring >>> keyring.set_password("database", "username")
where "database" and "username" have the same values as the corresponding options in config.ini.
Required packages
python3-sqlalchemy
python3-keyring
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.