Metadata-Version: 2.4
Name: hexway-hive-api
Version: 0.3.0
Summary: Small wrapper for HexWay Hive API
Author-email: "@Cur1iosity" <Cur1iosity@protonmail.com>
Project-URL: Homepage, https://github.com/Cur1iosity/hexway-hive-api
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic>=2.4.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: typing_extensions>=4.0.0; python_version < "3.11"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pyyaml>=6; extra == "dev"
Requires-Dist: openapi-schema-validator>=0.6; extra == "dev"
Dynamic: license-file

<div align="center">

# Hexway Hive API

[![Tests](https://img.shields.io/github/actions/workflow/status/Cur1iosity/hexway-hive-api/run-tests.yml?branch=main&event=push&label=tests)](https://github.com/Cur1iosity/hexway-hive-api/actions/workflows/run-tests.yml)
[![PyPI](https://img.shields.io/pypi/v/hexway-hive-api)](https://pypi.org/project/hexway-hive-api/)
[![Python](https://img.shields.io/pypi/pyversions/hexway-hive-api)](https://pypi.org/project/hexway-hive-api/)
[![License](https://img.shields.io/github/license/Cur1iosity/hexway-hive-api)](https://github.com/Cur1iosity/hexway-hive-api/blob/main/LICENSE)
[![Downloads](https://static.pepy.tech/badge/hexway-hive-api)](https://pepy.tech/projects/hexway-hive-api)
[![Last commit](https://img.shields.io/github/last-commit/Cur1iosity/hexway-hive-api/main)](https://github.com/Cur1iosity/hexway-hive-api/commits/main/)

</div>

**Hexway Hive API** is an unofficial Python client for the Hexway Hive REST API.
It has a synchronous client (`requests`) and an asynchronous client (`aiohttp`) for working with projects,
issues, files and users, so you can automate Hive from your own scripts.

Tested on HexWay Hive 2026.11.1.

## Installation
```bash
pip install hexway-hive-api
```

## Usage
### Synchronous client
```python
from hexway_hive_api import RestClient


def main() -> None:
    auth = {
        "server": "https://hive.example.com/",
        "username": "someuser",
        "password": "somepassword",
    }
    with RestClient().connection(**auth) as client:
        projects = client.get_projects().get("items")
        client.update_project(project_id=1, fields={"name": "New Project Name"})


if __name__ == "__main__":
    main()
```

### Asynchronous client
```python
import asyncio
from hexway_hive_api import AsyncRestClient


async def main() -> None:
    auth = {
        "server": "https://hive.example.com/",
        "username": "someuser",
        "password": "somepassword",
    }
    async with AsyncRestClient().connection(**auth) as client:
        projects = (await client.get_projects()).get("items")
        await client.update_project(project_id=1, fields={"name": "New Project Name"})


asyncio.run(main())
```

All methods, their arguments and what Hive returns: [docs/methods.md](docs/methods.md).

### TLS configuration

``AsyncHTTPClient`` accepts an optional ``ssl`` context in its constructor or
through :meth:`update_params`. This context will be passed to all requests if no
``ssl`` argument is provided explicitly. Verification of server certificates can
be toggled via the ``verify_ssl`` flag or ``verify`` parameter in
:meth:`update_params` and individual request methods. Disabling verification will
still keep TLS encryption enabled. ``AsyncRestClient.connect`` also respects the
``verify`` / ``verify_ssl`` options when establishing the session.

## Development

```bash
pip install -e ".[dev]"
pytest
```

Tests run without a Hive server. Requests the library sends are checked against
the Hive OpenAPI contract in `contracts/`, which is extracted from the official
offline installer. See [docs/testing.md](docs/testing.md) for the whole workflow
and for what to do when a new Hive version comes out.

## API coverage

![API coverage by library version](https://raw.githubusercontent.com/Cur1iosity/hexway-hive-api/coverage-assets/coverage.svg)

See [api_coverage_info/COVERAGE.md](api_coverage_info/COVERAGE.md) for what is covered,
by API section, and what is not yet.

## License

MIT, see [LICENSE](LICENSE).
