Metadata-Version: 2.4
Name: OMPython
Version: 4.1.0
Summary: OpenModelica-Python API Interface
Author-email: Anand Kalaiarasi Ganeson <ganan642@student.liu.se>
Maintainer-email: Adeel Asghar <adeel.asghar@liu.se>
License: --- Start of Definition of OpenModelica Run-time System Public License ---
        
        /*
         * This file belongs to the OpenModelica Run-Time System.
         *
         * 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
         * AGPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8.
         * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
         * ACCEPTANCE OF THE BSD NEW LICENSE OR THE OSMC PUBLIC LICENSE OR THE AGPL
         * 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
         * https://github.com/OpenModelica/ or
         * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica
         * distribution. GNU AGPL version 3 is obtained from:
         * https://www.gnu.org/licenses/licenses.html#GPL. The BSD NEW 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.
         *
         */
        
        --- End of OpenModelica Run-time System Public License ---
        
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
Requires-Dist: numpy
Requires-Dist: psutil
Requires-Dist: pyparsing
Requires-Dist: pyzmq
Dynamic: license-file

# OMPython [![License: OSMC-PL-RT](https://img.shields.io/badge/license-OSMC--PL--RT-lightgrey.svg)](LICENSE)

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

[![Test](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml/badge.svg)](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml)
[![PyPI Version](https://img.shields.io/pypi/v/OMPython.svg)](https://pypi.org/project/OMPython/)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ompython.svg)](https://anaconda.org/conda-forge/ompython)

## Dependencies

  - Python >= 3.10; Python >= 3.12 for `OMPath` functionality (handle file system access via OMC using a `pathlib.Path` compatible abstraction layer)
  - Additional packages: numpy, psutil, pyparsing and pyzmq

## Installation

Installation using `pip` is recommended.

### Via pip

```bash
pip install OMPython
```

### Via conda

OMPython is also available as a conda package via [conda-forge](https://conda-forge.org/)

```bash
conda install -c conda-forge ompython
```
See the [ompython-feedstock](https://github.com/conda-forge/ompython-feedstock) for details.

### Via source

Clone the repository and run:

```bash
cd <OMPythonPath>
python -m pip install -U .
```

## Usage

Running the following commands should get you started

```python
import OMPython
help(OMPython)
```

```python
import OMPython
omc = OMPython.OMCSessionLocal()
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:

```bash
# cd to the root of the repository
pre-commit install
```

## License

This project is licensed under the OSMC Public Runtime License. See [LICENSE](LICENSE) for details.

## Contact

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