Moorcheh client and runtime launcher for on-prem server containers.
Project description
moorcheh-client (Python)
This directory publishes the moorcheh-client distribution on PyPI. The importable module is still moorcheh (from moorcheh import MoorchehApiClient).
Install
pip install moorcheh-client(from this directory:pip install .)
Default server image: moorcheh/server:latest (override with moorcheh up --server-image … or MOORCHEH_SERVER_IMAGE to pin a specific release).
Data directory
moorcheh up stores your vectors and documents at:
~/.moorcheh/data(e.g.C:\Users\<you>\.moorcheh\dataon Windows)moorcheh_data_store.json,namespace_registry.json
moorcheh down stops containers but keeps ~/.moorcheh. Back up that folder to save everything.
CLI Commands
moorcheh up— start Moorcheh; uses host Ollama on127.0.0.1:11434when already runningmoorcheh down— stop Moorcheh containers (does not stop host Ollama)moorcheh status—GET /health(items, max_items, remaining)moorcheh namespace-create— create a text or vector namespacemoorcheh namespace-list— list namespaces and per-namespaceitem_countmoorcheh upload-documents—POST /namespaces/{namespace_name}/documents(async job)moorcheh upload-vectors—POST /namespaces/{namespace_name}/vectors(async job)moorcheh upload-job-status— poll upload job (documents or vectors)moorcheh items-get— get items by id within a namespacemoorcheh items-delete— delete items by id within a namespacemoorcheh namespace-delete— delete a namespace and all its itemsmoorcheh search— semantic search
Global item limit (100k)
Moorcheh stores at most 100,000 items total across all namespaces (text + vectors).
- Check quota:
moorcheh status→items,max_items,remaining - Uploads that would add new ids over the cap return 409 (entire batch rejected)
- Re-uploading an existing id in the same namespace is an update and does not use extra quota
- Deleting items or a namespace frees quota immediately
Item ids are unique per namespace (the same id string may exist in different namespaces).
Examples
moorcheh up
moorcheh status
moorcheh namespace-create --name docs --type text
moorcheh namespace-create --name products_vec --type vector --vector-dimension 768
moorcheh upload-documents --namespace-name docs --documents-file docs-upload.json
moorcheh upload-vectors --namespace-name products_vec --vectors-file vectors-upload.json
moorcheh upload-job-status --namespace-name docs --job-id job-abc123
moorcheh items-get --namespace-name docs --ids-json "[\"doc-1\"]"
moorcheh items-delete --namespace-name docs --ids-json "[\"doc-1\"]"
moorcheh search --query "on prem retrieval" --namespaces docs --top-k 5
Documents upload payload (docs-upload.json):
{
"documents": [
{
"id": "doc-1",
"text": "Moorcheh on-prem retrieval test",
"team": "ai"
}
]
}
Python API
from moorcheh import MoorchehApiClient, MoorchehApiError
client = MoorchehApiClient("http://localhost:8080")
health = client.health()
print(health["items"], health["remaining"])
try:
client.upload_namespace_vectors("products_vec", {"vectors": [...]})
except MoorchehApiError as e:
if e.is_item_limit_exceeded:
print(e.body) # items, max_items, requested_new
Optional Flask Demo App
pip install .[web]
python client/app.py
Ollama: host vs Docker
By default, moorcheh up uses Ollama on http://127.0.0.1:11434 when it is already running (typical on Windows/macOS). It does not start a second Ollama container in that case.
moorcheh up
# Using Ollama already running at http://127.0.0.1:11434 (moorcheh-ollama container not started)
Force behavior:
moorcheh up --use-host-ollama # never start moorcheh-ollama
moorcheh up --bundled-ollama # always start moorcheh-ollama container
moorcheh up --bundled-ollama --ollama-port 11435 # bundled Ollama on another host port
Port conflict fallback
If 8080 is busy:
moorcheh up --server-port 8081
moorcheh status --base-url http://localhost:8081
moorcheh up removes stale moorcheh-onprem-server (and moorcheh-ollama only when starting bundled Ollama). Data persists under ~/.moorcheh/data across restarts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moorcheh_client-0.1.0.tar.gz.
File metadata
- Download URL: moorcheh_client-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b162e6232f0d1d87b565971e27bf5cdbe9212240cfe7bc41c2eaf81d7c1d6f8e
|
|
| MD5 |
fa2edc4af41fe33c5e5b679efd1809b9
|
|
| BLAKE2b-256 |
9df7db20cb2eb87be3e31c922d334072da4955e6aa4897b39a8ea7ac400a5d44
|
File details
Details for the file moorcheh_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moorcheh_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3345724eb9c58983c2711e0634b972b04a12dc39ebc1867ae34a431d48080d2
|
|
| MD5 |
35ce246bcdcd476695d2015390a9148f
|
|
| BLAKE2b-256 |
3125d6b8e8b9260a5c17b01dd099b716a2973ccea1a5f90668a98775aa7b6329
|