2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
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.4 - 2019-02-05
[NEW] Simulator can now be started on a different node than mosaik, using the remote flag “-r” and the timeout flag “-t”. Mosaik can the integrate the simulator using the “connect” method of the simmanager.
2.3 – 2019-01-24
[BugFix] Bugfix Tests
2.2 – 2016-02-15
[NEW] API version 2.2: Added an optional “setup_done()” method.
[CHANGE] API version validation: The API version is no longer an integer but a “major.minor” string. The major part has to math with mosaiks major version. The minor part may be lower or equal to mosaik’s minor version.
[FIX] Various minor fixes and stability improvements.
2.1 – 2014-10-24
[NEW] Allow extra API methods to be called. See http://mosaik.readthedocs.org/en/2.0/mosaik-api/high-level.html#mosaik_api.Simulator
[CHANGE] The rel entry in the entity description returned by create() is now optional.
2.0 – 2014-09-22
Initial release of the mosaik 2 Sim API for Python.
Metadata
Release files for mosaik-api 2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mosaik-api-2.4.1.tar.gz | 19.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mosaik_api-2.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 39.4 kB
Release files / mosaik-api-2.4.1.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | mosaik-api-2.4.1.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d180337cebd061e6bbd181955e678069ca8946c90549e1f56a0a2867a20113ea
|
|
BLAKE2b-256 checksum How to use checksums |
056aefe360b6993e3329b032745992e91354b74b454539708c24c75923b92779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.2
|
Release files / mosaik_api-2.4.1-py2.py3-none-any.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | mosaik_api-2.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5f6d5f5211989ac2d93f76c67374cc5daad13bf1bb637885daf7fff1d3f6a03f
|
|
BLAKE2b-256 checksum How to use checksums |
cf88cc355a7e99f8cb7007f46c37e07d551a08e4f9fc4b72bc50f44d0686eecb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.2
|