Connect to the Server

This article decribes how to connect to a Milvus server from a Python client.

  • See Python API documentation for details about APIs.
  • It is recommended that you use Milvus Sizing Tool to estimate the hardware resources required for the data.
    1. Import pymilvus:

      # Import pymilvus
      >>> from milvus import Milvus, IndexType, MetricType, Status
      
    2. Use any of the following methods to connect to the Milvus server:

      # Connect to Milvus server
      >>> milvus = Milvus(host='localhost', port='19530')
      
      In the above code, host and port both use default values. You can change them to your IP address and port.
      >>> milvus = Milvus(uri='tcp://localhost:19530')
      
    Edit
    © 2019 - 2020 Milvus. All rights reserved.