Metadata-Version: 2.4
Name: aspen-pysys
Version: 0.1.0a2
Summary: Python API for Aspen HYSYS
Project-URL: Homepage, https://codeberg.org/CacklingTanuki/aspen-pysys
Project-URL: Issues, https://codeberg.org/CacklingTanuki/aspen-pysys/issues
Author-email: Hariidaran Tamilmaran <hariidaran@proton.me>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.12.12
Requires-Dist: pdoc>=16.0.0
Requires-Dist: pywin32>=311
Description-Content-Type: text/markdown

# aspen-pysys

Python API for Aspen HYSYS

## Requirements

- [Python 3.12.3](https://www.python.org/downloads/release/python-31213/)
- [pywin32 Build 311](https://pypi.org/project/pywin32/311/)

## Installation

Install via `pip install aspen-pysys` ([PyPI link](https://pypi.org/project/aspen-pysys/)).

## API reference

[https://cacklingtanuki.codeberg.page/aspen-pysys](https://cacklingtanuki.codeberg.page/aspen-pysys)

## Quickstart

1. Before you can use HYSYS, ensure that the simulation case you wish to work on is already open.
2. Once your simulation file is open, enter the following lines of code to set the package up.
3. An indicator that you have successfully connected with your simulation file is the printing of 'Aspen HYSYS' in the shell (or in a notebook cell if you are using a Jupyter cell or something similar).

```python
from aspen_pysys.app import HysysApp

hysys_app = HysysApp.dispatch()
```

To open a Aspen HYSYS simulation file (.hsc), use the `hysys_app.open(sim_filepath)`, where `sim_filepath` is the filepath to your simulation file.

```python
from pathlib import Path
import os

current_filepath = Path(os.getcwd())
sim_filepath = current_filepath / "test_sim.hsc"

simcase = hysys_app.open(sim_filepath)
print(simcase)
```

4. You can now use the aspen-pysys package in your code! Please refer to the [tutorial folder](https://codeberg.org/CacklingTanuki/aspen-pysys/src/tutorial) for an interactive example.