Metadata-Version: 2.5
Name: pyhivelms-core
Version: 3.10.1
Summary: Python bindings for Hive
Author-email: "Michael K. Steinberg" <m.kuper.steinberg@gmail.com>
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 :: Free Threading :: 3 - Stable
Requires-Python: >=3.10.0
Requires-Dist: attrs>=25.4.0
Requires-Dist: flask>=3.1.3
Requires-Dist: httpx>=0.28.1
Requires-Dist: keyring
Requires-Dist: platformdirs>=4.2
Requires-Dist: pydantic>=2.12.5
Requires-Dist: python-dateutil>=2.9.0
Requires-Dist: questionary>=2.0
Requires-Dist: typer>=0.20.0
Requires-Dist: typing-extensions>=4.12
Provides-Extra: codegen
Requires-Dist: datamodel-code-generator[http]>=0.66; extra == 'codegen'
Requires-Dist: pyyaml>=6.0; extra == 'codegen'
Provides-Extra: dev
Requires-Dist: pytest-cov>=6.2.1; extra == 'dev'
Requires-Dist: pytest-httpx>=0.36.0; extra == 'dev'
Requires-Dist: pytest>=9.0.2; extra == 'dev'
Requires-Dist: types-python-dateutil>=0.1.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material==9.8.0; extra == 'docs'
Provides-Extra: lint
Requires-Dist: mypy==2.3.0; extra == 'lint'
Requires-Dist: pylint==4.0.6; extra == 'lint'
Requires-Dist: ruff==0.16.9; extra == 'lint'
Description-Content-Type: text/markdown

## PyHive — Hive API client for Python

PyHive (package: `PyHiveLMS`) is a lightweight synchronous Python client for the Hive LMS API, featuring Pydantic V2-based models for type safety and validation.

It provides:

- `HiveClient`, a typed Python client for programs, subjects, modules, exercises, assignments, users, classes, the schedule and help requests.
- `pyhive`, a CLI for quick reads and deletes with `--json` output for scripts and agents.
- Runnable example scripts and a Claude Code skill, shipped inside the package.

**Documentation:** <https://ramot-systems-inc.github.io/.github/pyhive/> — the same pages ship in the package (`pyhive docs`).

### Supported Hive Versions
<!-- SUPPORTED_API_VERSIONS_START -->
- `5.11.1`
- `5.12.0`
- `6.0.1`
- `6.1.1`
- `6.2.0`
- `6.3.0`
- `6.4.0`
- `7.0.1`
- `7.1.0`
- `7.2.0`
- `7.3.0`
- `8.0.4`
<!-- SUPPORTED_API_VERSIONS_END -->

## Install

Install a tagged release from the org's pip index, hosted on GitHub Pages:

```pwsh
pip install PyHiveLMS --index-url https://ramot-systems-inc.github.io/.github/pypi/
```

To make it permanent, add the index to your pip config instead of passing it every time:

```pwsh
pip config set global.extra-index-url https://ramot-systems-inc.github.io/.github/pypi/
pip install PyHiveLMS
```

Or add it to `requirements.txt`:

```
--extra-index-url https://ramot-systems-inc.github.io/.github/pypi/
PyHiveLMS
```

Upgrade to the latest published wheel:

```pwsh
pip install --upgrade PyHiveLMS --index-url https://ramot-systems-inc.github.io/.github/pypi/
```

Or install an unreleased ref directly from GitHub:

```pwsh
pip install git+https://github.com/System-B90/pyhive.git
```

Published wheels are browsable at <https://ramot-systems-inc.github.io/.github/pypi/pyhivelms/> (the `PyHiveLMS` meta-package), with its parts under `pypi/pyhivelms-core/` and `pypi/pyhivelms-backend-<gen>/`.

## Quickstart

```python
from pyhive import HiveClient

with HiveClient.from_sso("https://hive.org") as client:  # opens a browser to sign in
    for program in client.get_programs():
        for subject in program.get_subjects():
            print(program.name, subject.symbol, subject.name)
```

```pwsh
pyhive auth login                 # pick the server, sign in once; later commands reuse both
pyhive --json programs list
pyhive examples run program_tree
```

## Documentation

The docs live in [`pyhive/docs/`](pyhive/docs/) and are the single source for three things:

- the [docs site](https://ramot-systems-inc.github.io/.github/pyhive/), published on every release;
- `pyhive docs show <page>` in the terminal, matching the installed version;
- the `pyhive` Claude Code skill: `pyhive docs install-skill`, or the `pyhive` plugin in the `System-B90/.github` marketplace.

| Page | Covers |
| --- | --- |
| [CLI reference](pyhive/docs/cli.md) | Every command, sign-in, `--json` output shapes |
| [Python SDK](pyhive/docs/sdk.md) | Connecting, filters, models, writes, errors, full method reference |
| [Examples](pyhive/docs/examples.md) | Runnable scripts in [`pyhive/examples/`](pyhive/examples/) |
| [Agent skill](pyhive/docs/SKILL.md) | What an AI agent needs to drive the CLI and SDK |

Preview the site locally with `pip install -e ".[docs]"` and `mkdocs serve`.

## Testing

```pwsh
pip install -e ".[dev]" $(python scripts/dists.py backends | sed "s/^/-e /")
pytest tests -q -m "not integration"   # offline, includes the docs drift checks
pytest -q                              # everything, against a live Hive at https://hive.org
```
