https://github.com/openmodelica/ompython
A Python interface to OpenModelica communicating via ZeroMQ
https://github.com/openmodelica/ompython
Last synced: 3 months ago
JSON representation
A Python interface to OpenModelica communicating via ZeroMQ
- Host: GitHub
- URL: https://github.com/openmodelica/ompython
- Owner: OpenModelica
- License: other
- Created: 2015-04-28T06:59:00.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T13:48:06.000Z (3 months ago)
- Last Synced: 2025-04-01T07:45:30.644Z (3 months ago)
- Language: Python
- Homepage:
- Size: 8.81 MB
- Stars: 117
- Watchers: 28
- Forks: 59
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# OMPython
OMPython is a Python interface that uses ZeroMQ to
communicate with OpenModelica.[](https://github.com/OpenModelica/OMPython/actions/workflows/FMITest.yml)
[](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml)## Dependencies
- Python 2.7 and 3.x supported
- PyZMQ is required## Installation
Installation using `pip` is recommended.
### Via pip
```bash
pip install OMPython
```### Via source
Clone the repository and run:
```
cd
python -m pip install -U .
```## Usage
Running the following commands should get you started
```python
import OMPython
help(OMPython)
``````python
from OMPython import OMCSessionZMQ
omc = OMCSessionZMQ()
omc.sendExpression("getVersion()")
```or read the [OMPython documentation](https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html)
online.## Bug Reports
- Submit bugs through the [OpenModelica GitHub issues](https://github.com/OpenModelica/OMPython/issues/new).
- [Pull requests](https://github.com/OpenModelica/OMPython/pulls) are welcome.## Contact
- Adeel Asghar,
- Arunkumar Palanisamy,