Metadata-Version: 2.4
Name: pyproresult
Version: 1.1.0
Summary: Library for interfacing with Proresult
Author-email: David Skoland <david.skoland@asterisk.digital>
License: MIT License
        
        Copyright (c) 2022 Asterisk Digital
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/asterisk-digital/pyproresult
Project-URL: Repository, https://github.com/asterisk-digital/pyproresult
Project-URL: Issues, https://github.com/asterisk-digital/pyproresult/issues
Keywords: proresult,api,client,hms,hse
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: lxml>=5.3
Requires-Dist: requests>=2.31
Dynamic: license-file

# pyproresult

A simple Python library for interfacing with [Proresult](https://proresult.app).

Unofficial: this project is not affiliated with or endorsed by Proresult.

## Installation

```bash
pip install pyproresult
```

## ApiClient

Reads data from Proresult's API.

```python
import pyproresult

api_client = pyproresult.ApiClient(account_id="YOUR_ACCOUNT_ID", api_secret="YOUR_API_SECRET")
projects = api_client.get_projects()
```

## WebClient

Uses Proresult's web interface for things the API doesn't cover, like document upload.

```python
import os

import pyproresult

web_client = pyproresult.WebClient(
    username=os.environ["PRORESULT_USERNAME"],
    password=os.environ["PRORESULT_PASSWORD"],
    dbname=os.environ["PRORESULT_DBNAME"],
)
```

Both clients raise `pyproresult.ProresultException` on failure.

## Contributing

```bash
uv sync
uv run ruff check . && uv run ruff format --check . && uv run tox
```

- Runtime dependencies use lower bounds (`>=`); dev dependencies are exact-pinned.
- Read required env vars with `os.environ[]`, not `os.getenv()`, so missing values fail loudly.
