{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "\n# Milvus Python SDK -- pymilvus\n\n[![version](https://img.shields.io/pypi/v/pymilvus.svg?color=blue)](https://pypi.org/project/pymilvus/)\n[![license](https://img.shields.io/hexpm/l/plug.svg?color=green)](https://github.com/milvus-io/pymilvus/blob/master/LICENSE)\n\nUsing Milvus python sdk for Milvus\nDownload\n---\nPymilvus only supports `python >= 3.4`, is fully tested under 3.4, 3.5, 3.6, 3.7.\n\n\nPymilvus can be downloaded using `pip`. If no use, try `pip3`\n```$\n$ pip install pymilvus\n```\nIf you are using `milvus-0.3.0`, last version that supports `milvus-0.3.0` is `0.1.13`, you can download by:\n```$\n$ pip install pymilvus==0.1.13\n```\n**[Note]** It's NOT recommended to upgrade to higher version if you are still using `milvus-0.3.0`\n\nIf you want to upgrade `pymilvus` to newest version\n```$\n$ pip install --upgrade pymilvus\n```\n## Import\n\n```python\nfrom milvus import Milvus, IndexType, Status\n```\n\n## Getting started\n\nInitial a `Milvus` instance and `connect` to the sever\n\n```python\n>>> milvus = Milvus()\n\n>>> milvus.connect(host='SERVER-HOST', port='SERVER-PORT')\nStatus(code=0, message=\"Success\")\n```\nOnce successfully connected, you can get the version of server\n\n```python\n>>> milvus.server_version()\n(Status(code=0, message='Success'), 0.3.1) # this is example version, the real version may vary\n```\n---\n\nAdd a new `table`\n\n\nFirst set param\n```python\n>>> param = {'table_name':'test01', 'dimension':256, 'index_type':IndexType.FLAT, 'store_raw_vector':False}\n```\nThen `create table`\n```python\n>>> milvus.create_table(param)\nStatus(message='Table test01 created!', code=0)\n```\n\nDescribe the table we just created\n```python\n>>> milvus.describe_table('test01')\n(Status(code=0, message='Success!'), TableSchema(table_name='test01',dimension=256, index_type=1, store_raw_vector=False))\n```\n\n---\n\nAdd vectors into table `test01`\n\nFirst create 20 vectors of 256-dimension.\n\n- Note that `random` and `pprint` we used here is for creating fake vectors data and pretty print, you may not need them in your project\n\n```python\n>>> import random\n>>> from pprint import pprint\n\n>>> dim = 256 # Dimension of the vector\n\n# Initialize 20 vectors of 256-dimension\n>>> fake_vectors = [[random.random() for _ in range(dim)] for _ in range(20)]\n```\n\nThen add vectors into table `test01`\n```python\n>>> status, ids = milvus.add_vectors(table_name='test01', records=vectors)\n>>> print(status)\nStatus(code=0, message='Success')\n>>> pprint(ids) # List of ids returned\n23455321135511233\n12245748929023489\n...\n```\n---\nSearch vectors\n\n```python\n# create 5 vectors of 256-dimension\n>>> q_records = [[random.random() for _ in range(dim)] for _ in range(5)]\n```\n\nThen get results\n```python\n>>> status, results = milvus.search_vectors(table_name='test01', query_records=q_records, top_k=10)\n>>> print(status)\nStatus(code=0, message='Success')\n>>> pprint(results) # Searched top_k vectors\n```\n\n---\nDelet the table we just created\n\n```python\n>>> milvus.delete_table(table_name='test01')\nStatus(code=0, message='Success')\n```\nDisconnect with the server\n```python\n>>> milvus.disconnect()\nStatus(code=0, message='Success')\n```\n\n---\n\n## Example python\nThere are some small examples in `examples/`, you can find more guide there.\n\nBuild docs\n```$\n$ sphinx-build -b html doc/en/ doc/en/build\n```\n\n\nIf you encounter any problems or bugs, please open new issues\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/milvus-io/pymilvus", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "milvus-test", "package_url": "https://pypi.org/project/milvus-test/", "platform": "", "project_url": "https://pypi.org/project/milvus-test/", "project_urls": { "Homepage": "https://github.com/milvus-io/pymilvus" }, "release_url": "https://pypi.org/project/milvus-test/0.1.1/", "requires_dist": [ "thrift" ], "requires_python": ">=3.4", "summary": "Python Sdk for Milvus; Test version", "version": "0.1.1" }, "last_serial": 5758094, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "56108aff7412c81be8c50267176d0b41", "sha256": "c3ad9624ab6c793a30bf6107eee3bea92758d0407e83a73a16ef7206fa6f79b6" }, "downloads": -1, "filename": "milvus_test-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "56108aff7412c81be8c50267176d0b41", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 26575, "upload_time": "2019-08-23T03:40:32", "url": "https://files.pythonhosted.org/packages/48/6e/ae0ff2427fd50f399b8ae5954d6bf24ea8ec5d6c8d80a6e313457ef4b135/milvus_test-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cc5e44c174b64272c273dae8649d3a0", "sha256": "28d69b072ca86d2dff600db48301c199d9300bf61a177ae9b3e7e946a4e42fab" }, "downloads": -1, "filename": "milvus-test-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2cc5e44c174b64272c273dae8649d3a0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 19321, "upload_time": "2019-08-23T03:40:34", "url": "https://files.pythonhosted.org/packages/03/63/77ff2da542eee716b6bb76e5595ff8457e5a4e959978f036ecd0a17ff5df/milvus-test-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7f02861c2a9331371fb6ad8a2b1e9d67", "sha256": "a0ddd03b3ba30f198acd32e3c2896171e384fe8694f704d439cd9bac23da2a6c" }, "downloads": -1, "filename": "milvus_test-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7f02861c2a9331371fb6ad8a2b1e9d67", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 26639, "upload_time": "2019-08-30T03:16:00", "url": "https://files.pythonhosted.org/packages/d1/e4/fdf16bebdb9117b5f1c5a37b0bc463719bbf006618f462ffb4dd4de742d1/milvus_test-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aae0f74fb400bef63208b8c3465d5c8d", "sha256": "85f9ebc1bfabd58f0fee6466fe156be784c86d9bca754d7e8b4ad38117623e81" }, "downloads": -1, "filename": "milvus-test-0.1.1.tar.gz", "has_sig": false, "md5_digest": "aae0f74fb400bef63208b8c3465d5c8d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 19401, "upload_time": "2019-08-30T03:16:02", "url": "https://files.pythonhosted.org/packages/bd/37/4f9722fa70549077ffd30273af98ebfce5de2beaf03bd27aabda72869d68/milvus-test-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f02861c2a9331371fb6ad8a2b1e9d67", "sha256": "a0ddd03b3ba30f198acd32e3c2896171e384fe8694f704d439cd9bac23da2a6c" }, "downloads": -1, "filename": "milvus_test-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7f02861c2a9331371fb6ad8a2b1e9d67", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 26639, "upload_time": "2019-08-30T03:16:00", "url": "https://files.pythonhosted.org/packages/d1/e4/fdf16bebdb9117b5f1c5a37b0bc463719bbf006618f462ffb4dd4de742d1/milvus_test-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aae0f74fb400bef63208b8c3465d5c8d", "sha256": "85f9ebc1bfabd58f0fee6466fe156be784c86d9bca754d7e8b4ad38117623e81" }, "downloads": -1, "filename": "milvus-test-0.1.1.tar.gz", "has_sig": false, "md5_digest": "aae0f74fb400bef63208b8c3465d5c8d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 19401, "upload_time": "2019-08-30T03:16:02", "url": "https://files.pythonhosted.org/packages/bd/37/4f9722fa70549077ffd30273af98ebfce5de2beaf03bd27aabda72869d68/milvus-test-0.1.1.tar.gz" } ] }