Skip to main content

Python SDK Reference

The PyMilvus Python SDK is the official Python client for Milvus and Zilliz Cloud. It provides both a high-level functional API via MilvusClient and a legacy ORM-style API.

Features

  • MilvusClient — Simplified functional API for common operations
  • ORM API — Legacy object-relational mapping style API
  • Bulk import — Local and remote bulk writers for large-scale data ingestion
  • Embedding models — Integrated support for text and image embeddings via pymilvus[model]
  • Rerankers — Built-in reranking functions for hybrid search

Install & Update

You can run the following command in your terminal to install the latest PyMilvus or update your PyMilvus to this version.

shell
pip install --upgrade pymilvus==3.0.1

After the installation, you can check the pymilvus version by running the following

python
from pymilvus import __version__

print(__version__)

# 3.0.1

Connect to Cluster

python
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
)

What's New

In this version, PyMilvus adds a MilvusClient module that incorporates several functional methods, aligning its functionality overall with that of the legacy ORM module.

Python SDK Reference

The PyMilvus Python SDK is the official Python client for Milvus and Zilliz Cloud. It provides both a high-level functional API via MilvusClient and a legacy ORM-style API.

Examples

In addition to the documents, you can also refer to the example sets in our GitHub repository.

Ctrl I