Connect to the Server
This article describes how to connect to a Milvus server from a Python client.
-
Import pymilvus:
# Import pymilvus. >>> from milvus import Milvus, IndexType, MetricType, Status
-
Use any of the following methods to connect to the Milvus server:
# Connect to the Milvus server. >>> milvus = Milvus(host='localhost', port='19530')
In the above code,host
andport
both use default values. You can change them to your IP address and port.>>> milvus = Milvus(uri='tcp://localhost:19530')