OMPython 
OMPython is a Python interface that uses ZeroMQ to communicate with OpenModelica.
Dependencies
- Python >= 3.10; Python >= 3.12 for
OMPathfunctionality (handle file system access via OMC using apathlib.Pathcompatible abstraction layer) - Additional packages: numpy, psutil, pyparsing and pyzmq
Installation
Installation using pip is recommended.
Via pip
pip install OMPython
Via conda
OMPython is also available as a conda package via conda-forge
conda install -c conda-forge ompython
See the ompython-feedstock for details.
Via source
Clone the repository and run:
cd <OMPythonPath>
python -m pip install -U .
Usage
Running the following commands should get you started
import OMPython
help(OMPython)
import OMPython
omc = OMPython.OMCSessionLocal()
omc.sendExpression("getVersion()")
or read the OMPython documentation online.
Bug Reports
- Submit bugs through the OpenModelica GitHub issues.
- Pull requests are welcome.
Development
It is recommended to set up pre-commit to automatically run linters:
# cd to the root of the repository
pre-commit install
License
This project is licensed under the OSMC Public Runtime License. See LICENSE for details.
Contact
- Adeel Asghar, adeel.asghar@liu.se
- Arunkumar Palanisamy, arunkumar.palanisamy@liu.se
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ompython-4.1.0.tar.gz.
File metadata
- Download URL: ompython-4.1.0.tar.gz
- Upload date:
- Size: 65.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5105d38e6449b642eed6633ebf3b6046d6a16e469130f7396f168b0b0e3a0063
|
|
| MD5 |
3d74ed356b1274fed93564e6eb2183f2
|
|
| BLAKE2b-256 |
03ec7e7292823f76648aad0c40e4bffec9e5a37b02f13a96bb152edda9cd3ecf
|
File details
Details for the file ompython-4.1.0-py3-none-any.whl.
File metadata
- Download URL: ompython-4.1.0-py3-none-any.whl
- Upload date:
- Size: 65.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
151f5e0706c10cdd9a04731c34762bb7fa30f694305c0f8be19402f187dba534
|
|
| MD5 |
e20d57899ccdfa5226b377c781dcba99
|
|
| BLAKE2b-256 |
2327704c191d4b9049481097b67301ee674b4248351abd7a275cdb6cad63a789
|