HiveLMS Client¶
A typed Python SDK for the Hive Learning Management System API.
Overview¶
hivelms-client provides a clean, Pydantic-validated interface to every Hive REST endpoint.
Instead of crafting raw HTTP requests and parsing JSON by hand you work with:
- Handler objects — one per resource, accessed as attributes on the main client.
- Pydantic models — fully typed request bodies (
*Input/*Patch) and response objects. - Automatic auth — JWT tokens are fetched and refreshed transparently on every request.
from hivelms_client import HiveClient
client = HiveClient(host="hive.example.com", username="admin0", password="secret")
# List exercises in a module
exercises = client.course_handler.exercises.search(parent_module_id=3)
for ex in exercises:
print(ex.id, ex.name)
# Create an assignment
from hivelms_client.models.assignments.assignment import AssignmentInput
assignment = client.assignments_handler.create(
AssignmentInput(exercise=exercises[0].id, user=7)
)
print(assignment.id, assignment.assignment_status)
Key Features¶
| Feature | Details |
|---|---|
| Fully typed | Every request and response is a Pydantic v2 model |
| Auto-auth | JWT fetch + 401-triggered refresh, no manual token management |
| Nested handlers | Sub-resources mirror the URL hierarchy (handler.items, handler.responses) |
| File downloads | FileResponse carries filename, MIME type, and raw bytes |
| Paginated search | HelpHandler.search(limit=…) returns ResultsPage with next/previous |
Quick Navigation¶
- New here? Start with Getting Started.
- Want to understand the architecture? Read API Structure.
- Looking for a specific handler? See Handlers & Sub-handlers.
- What operations does a resource support? See Resources & Operations.
- Need full method signatures? Go to the Reference.