Metadata-Version: 2.4
Name: psr-cloud
Version: 0.4.0
Summary: PSR Cloud Python Module
Author-email: Lucas Storino <lstorino@psr-inc.com>, Pedro Henrique <pedrohenrique@psr-inc.com>
Description-Content-Type: text/markdown
Requires-Dist: zeep
Requires-Dist: filelock
Requires-Dist: boto3
Requires-Dist: tqdm
Requires-Dist: keyring>=25.7.0
Provides-Extra: test
Requires-Dist: doit; extra == "test"
Requires-Dist: fastapi>=0.110; extra == "test"
Requires-Dist: python-dotenv; extra == "test"
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: pytest-cov>=4; extra == "test"
Provides-Extra: server
Requires-Dist: fastapi>=0.110; extra == "server"
Requires-Dist: uvicorn[standard]>=0.29; extra == "server"
Provides-Extra: desktop
Requires-Dist: pywebview>=5; extra == "desktop"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"

# psr.cloud (pycloud)

PSR Cloud Python module. Authenticate with PSR Cloud and submit, monitor, and
retrieve model cases programmatically from Python.

## Installation

### From source (recommended)

Copy the `psr` folder and its contents to your working directory, or add its
parent path to the `PYTHONPATH` environment variable.

### pip

```sh
pip install git+https://github.com/psrenergy/pycloud.git
```

## Quick example

```python
import psr.cloud

client = psr.cloud.Client()

case = psr.cloud.Case(
    name="Test PyCloud",
    program="SDDP",
    program_version="18.0.9",
    data_path="C:\\PSR\\SDDP18.0\\examples\\operation",
    price_optimized=True,
    execution_type="Operation Planning (Default)",
    number_of_processes=64,
    memory_per_process_ratio="2:1",
)

client.run_case(case)
```

## Interfaces

Besides the Python API above, the same capabilities are available through a CLI
(`console/`), a REST API (`api/`, `pip install -e .[server]`), and an integrated
**desktop app** (`desktop/`, `pip install -e .[desktop]`) that hosts the web UI and
calls the service layer in-process — `python -m desktop.app`. All delegate to the
shared, transport-agnostic `api/service.py`. The desktop app packages into a single
Windows executable (front-end + back-end) via `scripts\build_desktop_exe.bat` →
`dist\PSRCloud.exe`.

## Documentation

Full documentation lives in [`docs/`](docs/index.md): authentication, querying
PSR Cloud options, common workflows, and the complete API reference.

Preview it locally with:

```sh
uv run mkdocs serve
```

## Contributing

The architecture and change conventions live in
[`docs/architecture/`](docs/architecture/overview.md) — start there (an
auto-generated [code map](docs/architecture/index.md) shows where every public
symbol lives). The "definition of done" for any change is in
[`docs/architecture/conventions.md`](docs/architecture/conventions.md).
