Registry / vector-search / pymochow

pymochow

JSON →
library2.4.1pypypi✓ verified 81d ago

Python SDK for Mochow, a vector database service. Current version 2.4.0, requires Python >=3.7. Released on PyPI with regular updates.

pip install pymochow
INSTALL
IMPORT
SIG · PYMOCHOW
P
pymochow
vector-searchpythonv2.4.1
Install
2.8s avg
Import
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 26MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.8s · import 0.000s · 27MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MochowClient
from pymochow import MochowClient
from pymochow.client import MochowClient

Basic usage: create client, collection, insert documents, and search.

import os from pymochow.client import MochowClient from pymochow.model.collection import Collection from pymochow.model.document import Document # Replace with your Mochow endpoint and API key endpoint = os.environ.get('MOCHOW_ENDPOINT', 'http://localhost:8080') api_key = os.environ.get('MOCHOW_API_KEY', '') client = MochowClient(endpoint=endpoint, api_key=api_key) # Create a collection collection = Collection(name='my_collection', dimension=128) client.create_collection(collection) # Insert documents doc1 = Document(id='1', vector=[0.1]*128, metadata={'title': 'doc1'}) doc2 = Document(id='2', vector=[0.2]*128, metadata={'title': 'doc2'}) client.insert(collection.name, [doc1, doc2]) # Search results = client.search(collection.name, query_vector=[0.15]*128, top_k=2) for r in results: print(r.id, r.score)
Debug
Known issues
breakingIn version 2.x, the client initialization changed from positional arguments to keyword arguments. Using old-style instantiation will fail.
fix
Use MochowClient(endpoint='...', api_key='...') with explicit keyword arguments.
affects: >=2.0.0
deprecatedThe 'search' method's 'top_k' parameter is deprecated in favor of 'limit' starting from version 2.3.0.
fix
Use client.search(..., limit=10) instead of top_k=10.
affects: >=2.3.0,<3.0.0
gotchaDocument vector must be a list of floats with length exactly matching collection dimension. Providing an integer list or wrong dimension raises a validation error.
fix
Ensure vectors are lists of floats (e.g., [0.1, 0.2, ...]) and length equals the collection's dimension.
affects: >=1.0.0
gotchaAPI key is required for authentication; omitting it or using an invalid key results in 401 errors.
fix
Set environment variable MOCHOW_API_KEY or pass api_key as a constructor argument.
affects: >=1.0.0
Upgrade
Version history
2.4.1latest on PyPI · released May 9, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
pydanticrequiredData validation and settings management
Agent activity
54 hits · last 30 days
node
46
OpenAI (training)
1
Resources
pymochow — pip install pymochow · libregistry