Metadata-Version: 2.4
Name: OMPython
Version: 4.0.1
Summary: OpenModelica-Python API Interface
Author-email: Anand Kalaiarasi Ganeson <ganan642@student.liu.se>
Maintainer-email: Adeel Asghar <adeel.asghar@liu.se>
License:  This project is part of OpenModelica.
        
         Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
         c/o Linköpings universitet, Department of Computer and Information Science,
         SE-58183 Linköping, Sweden.
        
         All rights reserved.
        
         THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
         GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
         ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
         RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3,
         ACCORDING TO RECIPIENTS CHOICE.
        
         The OpenModelica software and the OSMC (Open Source Modelica Consortium)
         Public License (OSMC-PL) are obtained from OSMC, either from the above
         address, from the URLs: http://www.openmodelica.org or
         http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica
         distribution. GNU version 3 is obtained from:
         http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from:
         http://www.opensource.org/licenses/BSD-3-Clause.
        
         This program is distributed WITHOUT ANY WARRANTY; without even the implied
         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS
         EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE
         CONDITIONS OF OSMC-PL.
        
Project-URL: Homepage, http://openmodelica.org/
Project-URL: Documentation, https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html
Project-URL: Source Code, https://github.com/OpenModelica/OMPython
Project-URL: Issues, https://github.com/OpenModelica/OMPython/issues
Project-URL: Release Notes, https://github.com/OpenModelica/OMPython/releases
Project-URL: Download, https://pypi.org/project/OMPython/#files
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: COPYING
Requires-Dist: numpy
Requires-Dist: psutil
Requires-Dist: pyparsing
Requires-Dist: pyzmq
Dynamic: license-file

# OMPython

OMPython is a Python interface that uses ZeroMQ to
communicate with OpenModelica.

[![FMITest](https://github.com/OpenModelica/OMPython/actions/workflows/FMITest.yml/badge.svg)](https://github.com/OpenModelica/OMPython/actions/workflows/FMITest.yml)
[![Test](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml/badge.svg)](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml)

## Dependencies

-   Python 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 <OMPythonPath>
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.


## Development
It is recommended to set up [`pre-commit`](https://pre-commit.com/) to
automatically run linters:
```sh
# cd to the root of the repository
pre-commit install
```

## Contact

  - Adeel Asghar, <adeel.asghar@liu.se>
  - Arunkumar Palanisamy, <arunkumar.palanisamy@liu.se>
