Presents CSV datasets to mosaik as models.
Project description
mosaik-csv
This is pseudo simulator that presents CSV data sets to mosaik as models.
The following code shows an example how to use the mosaik-csv simulator. The date_format and delimiter parameter are optional. If they are not defined the standard value is ‘YYYY-MM-DD HH:mm:ss’ for the date_format and ‘,’ for delimiter.:
sim_config = { 'CSV': { 'python': 'mosaik_csv:CSV', } } world = mosaik.World(sim_config) csv_sim = world.start('CSV', sim_start='01.01.2016 00:00', datafile='data.csv', date_format='DD.MM.YYYY HH:mm', delimiter=',') csv = csv_sim.CSV.create(20)
Installation
$ pip install mosaik-csv
Tests
You can run the tests with:
$ git clone https://gitlab.com/mosaik/mosaik-csv.git $ cd mosaik-csv $ pip install -r requirements.txt $ pip install -e . $ pytest tests
If installation of psutil fails, installing python developer edition and gcc should help:
$ sudo apt-get install gcc python3-dev
Changelog
1.2.0 - 2021-05-21
[CHANGE] Updated to mosaik-api 3.0.
1.1.0 - 2021-03-11
[FEATURE] Allow to define the delimiter.
[FEATURE] Allow to define the date format.
1.0.4 - 2021-03-04
[CHANGE] Adjustment to new arrow API.
1.0.3 – 2019-10-10
[CHANGE] Added closing of input file.
[CHANGE] Adjustment to new arrow API.
1.0.2 – 2014-09-22
[CHANGE] Updated to mosaik-api 2.0.
1.0.1 – 2014-06-23
[CHANGE] Updated to mosaik-api 2.0a3.
1.0 – 2014-03-26
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mosaik_csv-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 977f8304ebf1b54e8a52936e7031740331c0bba6ea97c1ac8d64056719d48b16 |
|
MD5 | f4b7b0a29a41320b548a08d3edd749ed |
|
BLAKE2b-256 | c51a1c7c30e4d3a885641d35db9c8658b64d1790d7aeb6918c58cc650eab8a41 |