{"id":24363,"library":"pymochow","title":"Mochow Python SDK","description":"Python SDK for Mochow, a vector database service. Current version 2.4.0, requires Python >=3.7. Released on PyPI with regular updates.","status":"active","version":"2.4.0","language":"python","source_language":"en","source_url":"https://github.com/mochow-ai/pymochow","tags":["vector database","mochow","search","embedding","SDK"],"install":[{"cmd":"pip install pymochow","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false}],"imports":[{"wrong":"from pymochow.client import MochowClient","symbol":"MochowClient","correct":"from pymochow import MochowClient"}],"quickstart":{"code":"import os\nfrom pymochow.client import MochowClient\nfrom pymochow.model.collection import Collection\nfrom pymochow.model.document import Document\n\n# Replace with your Mochow endpoint and API key\nendpoint = os.environ.get('MOCHOW_ENDPOINT', 'http://localhost:8080')\napi_key = os.environ.get('MOCHOW_API_KEY', '')\nclient = MochowClient(endpoint=endpoint, api_key=api_key)\n\n# Create a collection\ncollection = Collection(name='my_collection', dimension=128)\nclient.create_collection(collection)\n\n# Insert documents\ndoc1 = Document(id='1', vector=[0.1]*128, metadata={'title': 'doc1'})\ndoc2 = Document(id='2', vector=[0.2]*128, metadata={'title': 'doc2'})\nclient.insert(collection.name, [doc1, doc2])\n\n# Search\nresults = client.search(collection.name, query_vector=[0.15]*128, top_k=2)\nfor r in results:\n    print(r.id, r.score)","lang":"python","description":"Basic usage: create client, collection, insert documents, and search."},"warnings":[{"fix":"Use MochowClient(endpoint='...', api_key='...') with explicit keyword arguments.","message":"In version 2.x, the client initialization changed from positional arguments to keyword arguments. Using old-style instantiation will fail.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use client.search(..., limit=10) instead of top_k=10.","message":"The 'search' method's 'top_k' parameter is deprecated in favor of 'limit' starting from version 2.3.0.","severity":"deprecated","affected_versions":">=2.3.0,<3.0.0"},{"fix":"Ensure vectors are lists of floats (e.g., [0.1, 0.2, ...]) and length equals the collection's dimension.","message":"Document vector must be a list of floats with length exactly matching collection dimension. Providing an integer list or wrong dimension raises a validation error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set environment variable MOCHOW_API_KEY or pass api_key as a constructor argument.","message":"API key is required for authentication; omitting it or using an invalid key results in 401 errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2.4.0':14 '3.7':17 'current':12 'databas':10,25 'embed':28 'mochow':1,7,26 'pypi':20 'python':2,4,16 'regular':22 'releas':18 'requir':15 'sdk':3,5,29 'search':27 'servic':11 'updat':23 'vector':9,24 'version':13","created_at":"2026-05-01T08:12:40.986694+00:00","updated_at":"2026-05-01T08:12:40.986694+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.4.1","cli_name":"","cli_version":null,"type":"library","homepage":"http://bce.baidu.com","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/pymochow/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["vector-search","database","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}