Skip to main content

Presents CSV datasets to mosaik as models.

Project description


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',
                            date_format='DD.MM.YYYY HH:mm',
csv = csv_sim.CSV.create(20)


$ pip install mosaik-csv


You can run the tests with:

$ git clone
$ 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


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


The mosaik CSV reader was created by Stefan Scherfke.

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

mosaik-csv-1.2.0.tar.gz (12.8 kB view hashes)

Uploaded source

Built Distribution

mosaik_csv-1.2.0-py2.py3-none-any.whl (12.8 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page