← Back to Leaderboard
Pmilvus-io

milvus-io/pymilvus

Python gRPC SDK for Milvus vector retrieval and collection management

View on GitHub ↗
AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A+ · 96/100
Maintenance Activity
● Updated yesterday
Latest Release
v3.0.4
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption21/25
Release Cadence20/20
License Clarity20/20
Docker
Total Stars
★ 1,427
24h Growth
+0
7d Growth
+0
Forks
514

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

milvus-io/pymilvus Star History (2020-01-12 - 2026-12-03) ALL-TIME STAR HISTORY (2020-01 – 2026-12) +1.4k in 2517d · avg +1/day 1.5k 753 0 2020-01-12: ★ 442020-06-13: ★ 772020-11-14: ★ 1282021-04-17: ★ 2002021-09-18: ★ 3072022-02-19: ★ 3822022-07-23: ★ 4242022-12-24: ★ 4652023-05-27: ★ 5502023-10-28: ★ 6992024-03-30: ★ 8092024-08-31: ★ 9402025-02-01: ★ 1,0492025-07-05: ★ 1,1942025-12-06: ★ 1,2822026-05-09: ★ 1,3632026-12-03: ★ 1,427 ★ 1.4k 2020-01 2023-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

PyMilvus is a Python client SDK, not the Milvus storage or search engine. Applications connect to a Milvus URI through MilvusClient for synchronous calls or AsyncMilvusClient for asyncio integration. In a server deployment, the application submits schema, data, and retrieval operations through the client; Milvus runs the database operations.

The protocol stack uses grpcio and protobuf, with orjson, pandas, and cachetools also declared as dependencies. Protocol bindings are generated from versioned milvus-proto definitions: the Git submodule supplies the definitions and make gen_proto regenerates the Python files. Packaging extras such as model and bulk_writer extend the install without turning the SDK into a backend abstraction.

Key Capabilities & Differentiators

The client covers vector retrieval and collection schema management, with recent releases adding more control over structured data. v3.0.3 extends Struct Arrays with nullable scalar and vector subfields and nested scalar arrays whose elements can be null. v3.0.4 adds Struct parent external_field mappings to both clients, including Struct templates and schema.add_field(...).

On the 2.6 line, v2.6.18 adds row-level security policy and principal-tag management, with rls_principal on supported reads and writes for server-side enforcement. Both clients can opt into gzip for outgoing gRPC messages; the server chooses its response encoding. Passing deflate raises ConnectionConfigException before the client connects.

Trade-offs & Limitations

PyMilvus is a strong fit when Milvus is already the chosen backend: its explicit schema and policy APIs expose Milvus-specific features, but those same interfaces make a backend change more than a connection-string swap. Compared with an in-process similarity library such as FAISS, a separate Milvus service adds a network boundary and another component to operate. A lighter in-process index may be sufficient if the application does not need server-managed schemas or data access policies.

The main operational constraint is compatibility: pin client and server together, and verify the specific APIs you use before upgrading either. Gzip is worth testing on representative payloads rather than enabling by default for assumed latency gains; it trades client CPU for potentially fewer outbound bytes. Remote SDK calls do not by themselves require a GPU on the Python host. Size the client, Milvus server, and any embedding runtime as separate workloads.

Hardware & Deployment Guide

For a current 3.0 deployment, use Python 3.9 or newer and pin PyMilvus alongside the server version. The release pairings are PyMilvus 3.0.4 with Milvus 3.0.7 and PyMilvus 3.0.3 with Milvus 3.0.6; PyMilvus 2.6.18 targets Milvus 2.6 and supports Python 3.8 or later. Install the SDK into the application environment and configure a reachable Milvus URI. Add the model or bulk_writer extra only if needed.

The root Dockerfile uses python:3.6-slim, pins pymilvus==2.0.0, and starts python. It is neither a current 3.x client image nor a Milvus server image. If deploying in containers, build the application image on a supported Python base and deploy Milvus separately. For SDK development, the maintained test commands use uv, make unittest, and make integration-lite; the Lite test target is not a production deployment recipe.

Client API: MilvusClient and AsyncMilvusClient provide synchronous and asynchronous entry points to Milvus.
Transport: Both clients accept grpc_compression="gzip" for outgoing messages and reject deflate before connecting.
Schema evolution: v3.0.3 adds nullable Struct Array subfields; v3.0.4 adds Struct parent external_field mappings.
Access control: v2.6.18 adds RLS policy and principal-tag management, plus rls_principal on supported operations.
Packaging: Python 3.9+ for the current line, with optional model and bulk_writer extras.
Container mismatch: The root Dockerfile still installs PyMilvus 2.0.0 on Python 3.6 and starts python, not a Milvus server.
Best For

Python RAG, semantic search, and similar retrieval services that already use Milvus and need synchronous or asynchronous access, explicit collection schemas, and version-matched integrations.

Skip If

You need a standalone local index, a complete RAG pipeline, or one client that works across multiple vector databases.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Docker
$ pip3 install pymilvus
$ pip3 install pymilvus[model] # for milvus-model
$ pip3 install pymilvus[bulk_writer] # for bulk_writer

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
pymilvus ★1.4k—PythonApache-2.0Python gRPC SDK for Milvus vector retrieval and collection management
llama_index53.1k+104PythonMITA modular Python SDK for document ingestion, indexing, and RAG
auto-ontology19.1k+3.7kPythonApache-2.0An ontology framework that grounds agent-generated SQL in reviewed business defi
langextract39.5k+85PythonApache-2.0Python SDK for extracting structured data with traceable source spans

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/milvus-io/pymilvus.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

milvus-io/pymilvus Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about pymilvus

How do I integrate PyMilvus into a Python retrieval service?

Install a PyMilvus version recommended for your Milvus server, then pass the service URI to MilvusClient or AsyncMilvusClient. Choose the async client when retrieval needs to fit an existing asyncio request path. Collection schema and access policies still need to be configured for the target deployment.

Does the SDK need a GPU, and how should I size its runtime?

A remote-client deployment does not require a local GPU just to make Milvus calls. Size the Python process around request concurrency, vector payloads, result sizes, and any compression overhead. Size the Milvus server and any separately run embedding model independently; there is no fixed RAM or VRAM requirement for the whole stack.

Can I use PyMilvus commercially in a self-hosted product?

PyMilvus is Apache-2.0 licensed, which permits commercial use and self-hosted integration. If you redistribute the SDK or a derivative, review the applicable license, attribution, and notice obligations. Check the terms for the Milvus deployment, optional dependencies, and any models separately.

When should I choose PyMilvus over FAISS or another database's SDK?

Use PyMilvus when Milvus is the backend and you want typed collection schemas and server-managed data access through a Python client. Use a library such as FAISS when the job is an in-process similarity index and your application can own persistence and access control. If another vector database is already in place, use its native client or budget for a migration; PyMilvus is not a drop-in adapter.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining milvus-io/pymilvus? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature milvus-io/pymilvus on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare