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
Metadata
Release files for OMPython 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ompython-4.1.0.tar.gz | 65.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ompython-4.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.2 kB
Release files / ompython-4.1.0.tar.gz
| Download URL | ompython-4.1.0.tar.gz |
|---|---|
| Size | 65.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5105d38e6449b642eed6633ebf3b6046d6a16e469130f7396f168b0b0e3a0063
|
|
BLAKE2b-256 checksum How to use checksums |
03ec7e7292823f76648aad0c40e4bffec9e5a37b02f13a96bb152edda9cd3ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|
Release files / ompython-4.1.0-py3-none-any.whl
| Download URL | ompython-4.1.0-py3-none-any.whl |
|---|---|
| Size | 65.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
151f5e0706c10cdd9a04731c34762bb7fa30f694305c0f8be19402f187dba534
|
|
BLAKE2b-256 checksum How to use checksums |
2327704c191d4b9049481097b67301ee674b4248351abd7a275cdb6cad63a789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|