Metadata-Version: 2.1
Name: oedialect
Version: 0.1.1
Summary: SQL-Alchemy dialect for the OpenEnergy Platform
Home-page: https://github.com/openego/oedialect
Author: MGlauer
Author-email: martinglauer89@gmail.com
Keywords: postgres,open,energy,database,sql,rest
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlalchemy >=1.3.16
Requires-Dist: requests >=2.13
Requires-Dist: psycopg2-binary
Requires-Dist: geoalchemy2 <0.7.0
Requires-Dist: shapely
Requires-Dist: python-dateutil
Provides-Extra: tests
Requires-Dist: black ; extra == 'tests'
Requires-Dist: tox ; extra == 'tests'
Requires-Dist: pytest ==5.3 ; extra == 'tests'
Requires-Dist: pandas ; extra == 'tests'
Requires-Dist: sqlahelper ; extra == 'tests'
Requires-Dist: geojson ; extra == 'tests'

﻿<a href="http://oep.iks.cs.ovgu.de/"><img align="right" width="200" height="200" src="https://avatars2.githubusercontent.com/u/37101913?s=400&u=9b593cfdb6048a05ea6e72d333169a65e7c922be&v=4" alt="OpenEnergyPlatform"></a>

# An [SQLAlchemy][0] [Dialect][1] for the [OEP][2]

SQLAlchemy internally uses so called "dialects" to provide a consistent
interface to different database drivers. The `oedialect` supplies your
SQLAlchemy installation with a dialect using the REST-API of the [Open
Energy Platform (OEP)][2]. In short, the `oedialect` allows you to use
SQLAlchemy to down- and upload data to an OEP instance.

[0]: https://www.sqlalchemy.org/
[1]: https://docs.sqlalchemy.org/en/13/dialects/
[2]: https://github.com/OpenEnergyPlatform/oeplatform

## License / Copyright

This repository is licensed under [GNU Affero General Public License v3.0 (AGPL-3.0)](https://www.gnu.org/licenses/agpl-3.0.en.html)

## Installation

`pip install oedialect`

On MS-Windows make sure to install a version of `shapely` first.
`conda install shapely -c conda-forge`

## Tutorials

You can find tutorials and examples [here](https://github.com/OpenEnergyPlatform/examples/tree/master/api).


## Testing

To run the tests locally, first install the `tox` test environment
`pip install tox`

You need to setup a local instance of the [Open Energy Platform](https://github.com/OpenEnergyPlatform/oeplatform)

Set your connection token that you got from your local OEP instance
`LOCAL_OEP_TOKEN=<your_token>`

Finally, run
`tox`
