Overview
The moorcheh-client package provides a Python client for calling the Moorcheh on-prem API, plus themoorcheh CLI for starting the runtime and running the same operations from the shell.
No API keys are required — the client talks directly to your local Moorcheh instance.
Package
| PyPI | moorcheh-client |
| Import | from moorcheh import MoorchehClient, MoorchehApiError |
| CLI | moorcheh (installed with the same package) |
Start the server
http://localhost:8080
Client (recommended)
UseMoorchehClient with resource modules — same layout as the cloud Python SDK:
| Argument | Default | Description |
|---|---|---|
base_url | http://localhost:8080 | Moorcheh API URL (trailing slash is stripped) |
timeout | 30 | Request timeout in seconds |
Resources
| Resource | Methods | Description |
|---|---|---|
client.health() | — | Server status and global item quota |
client.namespaces | create, list, delete, delete_job_status | Namespace management |
client.documents | upload, get, delete, fetch_text_data, upload_job_status | Text documents and chunks |
client.vectors | upload, delete, upload_job_status | Precomputed vector data |
client.files | upload, list, get, delete, job_status | Path-based file upload (on-prem) |
client.similarity_search | query | Semantic search |
client.answer | generate | RAG or direct LLM answers |
Legacy flat client
MoorchehApiClient remains available for backward compatibility:
MoorchehClient resources internally.
Errors
Non-2xx HTTP responses raiseMoorchehApiError with:
status_code— HTTP status (for example400,404,409)body— parsed JSON error body when availableis_item_limit_exceeded—Truefor 409 quota errors on uploads
Next steps
- Getting started — end-to-end workflow
- Quickstart — CLI walkthrough
- API reference — full HTTP API docs