Metadata-Version: 2.1
Name: pypsdm
Version: 0.0.6
Summary: 
Author: Thomas Oberliessen
Author-email: thomas.oberliessen@googlemail.com
Requires-Python: >3.11,<3.13
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: geoalchemy2 (>=0.17.1,<0.18.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: matplotlib (>=3.10.1,<4.0.0)
Requires-Dist: networkx (>=3.1,<4.0)
Requires-Dist: numba (>=0.61.2,<0.62.0)
Requires-Dist: numpy (>=2.2.5,<3.0.0)
Requires-Dist: pandas (>=2.2.3,<2.3.0)
Requires-Dist: plotly (>=6.0.1,<7.0.0)
Requires-Dist: psycopg2 (>=2.9.10,<3.0.0)
Requires-Dist: pyhocon (>=0.3.60,<0.4.0)
Requires-Dist: python-dotenv (>=1.1.0,<2.0.0)
Requires-Dist: scipy (>=1.15.2,<2.0.0)
Requires-Dist: seaborn (==0.13.2)
Requires-Dist: shapely (>=2.0.7,<3.0.0)
Requires-Dist: sqlmodel (>=0.0.24,<0.0.25)
Description-Content-Type: text/markdown

# pypsdm

pypsdm aims to make power system model analysis a breeze. It is based upon the [Power System Data Model (PSDM)](https://github.com/ie3-institute/PowerSystemDataModel). 

Its main functionalities include:

- parsing grid models and associated result data
- calculation utilities for event discrete time series data 
- plotting capabilities for grid and result data

It is currently under development. So if you want to use it, expect it to change quite frequently for now.

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

## Installation

To add the project as dependency run 
```console
pip install pypsdm
```
or 
```console
poetry add pypsdm
```
depending on your depedency management system. 

If you want to clone and explore the repository locally, run
```console
poetry install 
```
inside the repository root folder.
For more information about poetry, refer to their [documentation](https://python-poetry.org/docs/).

## Documentation

Please refer to:

- `docs/nbs/input_models.ipynb`
- `docs/nbs/result_models.ipynb`
- `docs/nbs/plotting_utilities.ipynb`

to see exemplary notebooks outlining some of the basic functionalities.

## Quickstart:

You can read grid models via

```python
from pypsdm.models.gwr import GridWithResults

grid_path = "/path/to/my/psdm/grid"
result_path = "/path/to/my/psdm/results"

gwr = GridWithResults.from_csv(grid_path, result_path)
```

If you only want to read the grid model without the results 

```python
# All relevant input models can be imported from `pypsdm/models/input`
from pypsdm.models.input import GridContainer

grid_path = "/path/to/my/psdm/grid"
grid = GridContainer.from_csv(grid_path)
```

If you only want to read the results without the grid model

```python
# All relevant result models can be imported from `pypsdm/models/result`
from pypsdm.models.results import GridResultContainer

result_path = "/path/to/my/psdm/results"
results = GridResultContainer.from_csv(result_path)
```

## Known Issues

- When adding the project as a dependency the language server of the code editors do not 
suggest autoimports for all symbols of the project, which means they have to be imported
manually. It might  have something to do with how poetry publishes the artifacts. If you
have an idea what the issue could be any tipps are welcome.

