Python implementation of the mosaik API.
Project description
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.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.
Project details
Release history Release notifications | RSS feed
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_api-2.0a3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 594cf4c31fc0de4cff3eea6a9709da360d0cdc99ff1e1536d4431413201d4c7f |
|
MD5 | d203615f28ce77a235d25c276208c913 |
|
BLAKE2b-256 | 8798c26039b48c7472bb3348b6f9cb96b73303f1f8b1a70db284d5953e5d6bf1 |