Metadata-Version: 2.1
Name: hesmapy
Version: 23.12.1
Summary: HESMA file format reader and writer
Project-URL: Homepage, https://github.com/alexhls/hesmapy
Project-URL: Bug Tracker, https://github.com/alexhls/hesmapy/issues
Author-email: Alexander Holas <alex.holas@gmx.de>
License-File: LICENSE
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: jsonschema
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.1
Requires-Dist: plotly>=5.18
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Description-Content-Type: text/markdown

# Hesmapy

![PyPI - Version](https://img.shields.io/pypi/v/hesmapy)
![PyPI - Downloads](https://img.shields.io/pypi/dm/hesmapy)

HESMA Python - Tools for reading HESMA models

## Documentation
Full documentation can be found [here](https://alexhls.github.io/hesmapy/).

## Installation
Currently, the package is only available through ``pip``.
```
pip install hesmapy
```

In case you want to build the documentation, you'll need to install the optional dependencies as well.
See ``pyproject.toml`` for a list of needed packages (mostly ``sphinx`` related packages)

## Contents
``hesmapy`` contains three main modules, one for each of the main HESMA categories (Hydro, RT, Tracer).
It provides utilties to read and write files in the standardised HESMA file formats, as well as
some utilities such as plotting. These utilities are mostly intended for use by HESMA itself and 
might be rather limited in their functionality.

### Hydro

#### Hydro1D
This module contains the tools for one-dimensional hydro models. See below for some basic usage examples.  

Loading models:
```python
import hesmapy.base as hp
model = hp.load_hydro_1d("examples/hydro/hydro_1d.json")
```
Get the data from a model as a ``pd.DataFrame``:
```python
df = model.get_data()
```
Plot a model:
```
model.plot(show_plot=True)
```
Model files can be written by providing either a ``pd.DataFrame``, ``dict`` or several ``np.ndarray``.
See the documentation for more details.

### RT
*(Not yet implemented)*

### Tracer
*(Not yet implemented)*

