MilvusClient
A MilvusClient instance represents a Python client that connects to a specific Zilliz Cloud cluster.
pymilvus.MilvusClient
Constructor
Constructs a client for common use cases.
This client serves as an easy-to-use alternative for the current set of APIs that handles Create, Read, Update, and Delete (CRUD) operations on Zilliz Cloud.
MilvusClient(
    uri: str,
    user: str,
    password: str,
    db_name: str,
    token: str,
    timeout=None,
    **kwargs
)
PARAMETERS:
- 
uri (string) - The URI of the Zilliz Cloud cluster. For example: https://inxx-xxxxxxxxxxxxxxxxx.aws-us-west-2.vectordb-uat3.zillizcloud.com:19540
- 
user (string) - A valid username used to connect to the specified Zilliz Cloud cluster. This should be used along with password. 
- 
password (string) - A valid password used to connect to the specified Zilliz Cloud cluster. This should be used along with user. 
- 
db_name (string) - The name of the database to which the target Milvus instance belongs. 
- 
token (string) - A valid access token to access the specified Zilliz Cloud cluster. This can be used as a recommended alternative to setting user and password separately. When setting this field, notice that: A valid token should be either 
- 
A pair of username and password used to access the target cluster, joined by a colon (:). For example, you can set this to username:p@ssw0rd.
 
- 
timeout (float | None) The timeout duration for this operation. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs. 
Examples
from pymilvus import MilvusClient
# Authentication enabled with a cluster user
client = MilvusClient(
    uri="https://inxx-xxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com:19530",
    token="user:password", # replace this with your token,
    db_name="default"
)
Set uri to your cluster endpoint. The token parameter can be a Zilliz Cloud API key with sufficient permissions or the credentials of a cluster user in the format of username:p@ssw0rd.