Skip to main content

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 .
$ py.test
$ tox

If installation of psutil fails, installing python developer edition and gcc should help:

$ sudo apt-get install gcc python3-dev

Changelog

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

Authors

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.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mosaik_csv-1.1.0-py2.py3-none-any.whl (12.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mosaik-csv-1.1.0.tar.gz.

File metadata

  • Download URL: mosaik-csv-1.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.4

File hashes

Hashes for mosaik-csv-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0282b189e3d19c6c7c3c28430c73ab0273d1e319c1e06ff14e206ca0c429cb94
MD5 baef3ec5a76cee5ad7242e01dcac68c5
BLAKE2b-256 ac7d6fc3c5bbafdc68bb1ce3573a0a3968839c01ac08e3e5b818ea73d6861eed

See more details on using hashes here.

File details

Details for the file mosaik_csv-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mosaik_csv-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.4

File hashes

Hashes for mosaik_csv-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0dd9c37d520456586d4f4334b79b8a3463eb125ed2750417692f22b379b659cd
MD5 d2e9a78af7c3fa2866e22b8fd94233b1
BLAKE2b-256 e7fe7f6fc339f9a9788f4edc014e7bceb78fc8191dd83ffefeea6307d7af7175

See more details on using hashes here.

Supported by

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