Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Mosaik API for Python

This is an implementation of the mosaik API for simulators written in Python. It hides all the messaging and networking related stuff and provides a simple base class that you can implement.

Installation

Just use pip to install it:

$ pip install mosaik-api

Documentation

Please refer to mosaik’s documentation of the API.

Example Simulator

This distribution contains an example simulator in the example_sim package.

It can be started via the pyexamplesim command; pyexamplesim --help shows you how to use it.

It can also be run in-process by importing and calling example_sim.mosaik.main().

Example MAS

This distribution contains an example “multi-agent system” that uses the asyncronous remote calls to mosaik (get_progress(), get_related_entities(), get_data(), set_data()).

It can be started via the pyexamplemas command; pyexamplemas --help shows you how to use it.

It can also be run in-process by importing and calling example_mas.mosaik.main().

Development setup

To setup a devleopment environment, create a virtualenv and install the packages from requirements.txt:

$ mkvirtualenv --python=/usr/bin/python3 mosaik-api-python
(mosaik-api-python)$ pip install -r requirements.txt

To run the tests for the Python version you are currently using, execute py.test. You should also add the test coverage check:

(mosaik-api-python)$ py.test --cov=example_mas --cov=example_sim --cov=mosaik_api

To run the tests for all supported Python versions, run tox:

(mosaik-api-python)$ tox

Mosaik’s documentation contains more details.

Changelog

2.0a4 – 2014-07-31

  • [CHANGE] Adopted latest changes of the mosaik low-level API.

2.0a3 – 2014-06-26

  • [CHANGE] Adopted latest changes of the mosaik low-level API.

2.0a2 – 2014-05-05

  • [NEW] Enabled set_data() RPC.

  • [NEW] Added example_mas that uses the async. remote calls.

  • [REMOVED] Support for Python 2.6.

2.0a1 – 2014-03-26

  • Initial release. Note, that mosaik is still alpha and not yet done.

Authors

The original concepts for the mosaik API were developed by Steffen Schütten and Stefan Scherfke.

The author of the mosaik API version 2 is Stefan Scherfke.

Metadata

Release files for mosaik-api 2.0a4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosaik-api 2.0a4
File Size Uploaded
mosaik-api-2.0a4.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mosaik-api 2.0a4
File Interpreter ABI Platform
mosaik_api-2.0a4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.3 kB

Release files / mosaik-api-2.0a4.tar.gz

Download URL mosaik-api-2.0a4.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
391b5782366cd8d10018f269ad317b0ee3f9779e6b4c3fbfd27e40539d9ecdc1
BLAKE2b-256 checksum
How to use checksums
50278cf4a8d35d52650213e855be6983a9c393df1ed77e5d02df97617affbcc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mosaik_api-2.0a4-py2.py3-none-any.whl

Download URL mosaik_api-2.0a4-py2.py3-none-any.whl
Size 12.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8c103d972718e8c4c5977120fa9b8188bc82a5083d738bacb16a55c004004235
BLAKE2b-256 checksum
How to use checksums
38013c97b86cf39830db9200c1bf1bd5d06011c6c58403f87d59852a1b18c395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page