Python vector database libraries

Updated Nov 2026

Python vector database libraries store embeddings and find the stored items closest to a query vector. A client either talks to a vector database server over the network or runs an embedded index inside the Python process. These libraries let AI agents and search features retrieve relevant documents by meaning.

Popularity

pgvector has the most monthly downloads in this comparison, at 43.4M.

LibraryMonthly downloadsStarsLast releaseLicense
pgvector
43.4M
1.5KOct 2026MIT
Qdrant
15.9M
1.4KOct 2026Apache-2.0
Chroma
8.7M
29.7KMay 2026Apache-2.0
sqlite-vec
7.6M
8.3KMar 2026MIT
LanceDB
7.1M
11.9KOct 2026Apache-2.0
turbopuffer
6.8M
191Oct 2026MIT
Weaviate
5.1M
230Oct 2026BSD-3-Clause
Pinecone
4.6M
457Nov 2026Apache-2.0
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

pgvector

Provides pgvector support for Python.

Downloads / mo
43.4M
Stars
1.5K
Last release
0.5.1
License
MIT

Quickstart

From README.md
$ pip install pgvector==0.5.1 "psycopg[binary]" numpy
import os, numpy as np, psycopg
from pgvector.psycopg import register_vector
with psycopg.connect(os.environ["DATABASE_URL"]) as connection:
    register_vector(connection)
    print(connection.execute("SELECT %s::vector <-> %s::vector", (np.array([1.0, 2.0]), np.array([2.0, 4.0]))).fetchone())

Provides synchronous and asynchronous Python APIs for Qdrant vector search.

Downloads / mo
15.9M
Stars
1.4K
Last release
1.20.0
License
Apache-2.0

Strengths

  • Prototypes without a server. Use local memory or disk storage through the same client API.
  • Offers sync and async APIs. Choose the client that matches the application’s concurrency model.

Limitations

  • Local mode targets prototyping. Switch to server mode when the workload needs to scale.
  • Text embeddings need extra setup. Install FastEmbed or configure cloud inference to turn text into vectors.

Quickstart

From README.md
$ pip install qdrant-client==1.20.0
from qdrant_client import QdrantClient, models
client = QdrantClient(":memory:")
client.create_collection("demo", vectors_config=models.VectorParams(size=2, distance=models.Distance.COSINE))
client.upsert("demo", points=[models.PointStruct(id=1, vector=[0.1, 0.2], payload={"kind": "note"})])
print(client.query_points("demo", query=[0.1, 0.2], limit=1).points)

Qdrant examples

From open-source projects on GitHub

Provides local and server-backed vector collections with document and metadata queries.

Downloads / mo
8.7M
Stars
29.7K
Last release
1.5.9
License
Apache-2.0

Strengths

  • Persists collections on local disk. Use PersistentClient to store data between runs.
  • Filters vector results by metadata. Pass where conditions when querying a collection.

Limitations

  • Hybrid Search requires Chroma Cloud. Use the Cloud Search API for hybrid ranking.
  • In-memory clients lose data. Use persistent storage when the data must survive the process.

Quickstart

From README.md
$ pip install chromadb==1.5.9
import chromadb
client = chromadb.EphemeralClient()
collection = client.create_collection("demo", embedding_function=None)
collection.add(ids=["a"], embeddings=[[0.1, 0.2]], metadatas=[{"kind": "note"}])
print(collection.query(query_embeddings=[[0.1, 0.2]], n_results=1))

Chroma examples

From open-source projects on GitHub

Adds vector search to SQLite as an extension.

Downloads / mo
7.6M
Stars
8.3K
Last release
0.1.9
License
MIT

Quickstart

From README.md
$ pip install sqlite-vec==0.1.9
import sqlite3, sqlite_vec
database = sqlite3.connect(":memory:")
database.enable_load_extension(True)
sqlite_vec.load(database)
database.enable_load_extension(False)
database.execute("CREATE VIRTUAL TABLE items USING vec0(embedding float[2])")
database.execute("INSERT INTO items(rowid, embedding) VALUES (?, ?)", (1, sqlite_vec.serialize_float32([1.0, 2.0])))
print(database.execute("SELECT rowid, distance FROM items WHERE embedding MATCH ? AND k = 1", (sqlite_vec.serialize_float32([0.9, 2.1]),)).fetchall())

sqlite-vec examples

From open-source projects on GitHub

Provides the LanceDB Python package.

Downloads / mo
7.1M
Stars
11.9K
Last release
0.41.0
License
Apache-2.0

Quickstart

From README.md
$ pip install lancedb==0.41.0
import lancedb
database = lancedb.connect("./vector-demo.lancedb")
table = database.create_table("demo", data=[{"id": 1, "vector": [0.1, 0.2]}])
print(table.search([0.1, 0.2]).limit(1).to_list())

LanceDB examples

From open-source projects on GitHub

Provides the official Python library for the turbopuffer API.

Downloads / mo
6.8M
Stars
191
Last release
3.1.0
License
MIT

Quickstart

From README.md
$ pip install turbopuffer==3.1.0
from turbopuffer import Turbopuffer
client = Turbopuffer(region="gcp-us-central1")
namespace = client.namespace("vector-demo")
namespace.write(distance_metric="cosine_distance", upsert_rows=[{"id": 1, "vector": [0.1, 0.2], "text": "Hello"}])
print(namespace.query(rank_by=("vector", "ANN", [0.1, 0.2]), top_k=1, include_attributes=True).rows)

turbopuffer examples

From open-source projects on GitHub

Provides synchronous and asynchronous Python access to Weaviate collections and search.

Downloads / mo
5.1M
Stars
230
Last release
4.24.1
License
BSD-3-Clause

Strengths

  • Combines keyword and vector retrieval. Tune the balance and fusion method used for hybrid search.
  • Supports asynchronous query workflows. Use WeaviateAsyncClient for concurrent application operations.

Limitations

  • Requires server gRPC access. Expose the server’s gRPC port when deploying the Python client.
  • Embedded deployment remains experimental. Expect embedded APIs and parameters to change.

Quickstart

From quickstart.byov.all.py
$ pip install weaviate-client==4.24.1
import weaviate
from weaviate.classes.config import Configure, DataType, Property
with weaviate.connect_to_local() as client:
    collection = client.collections.create("VectorDemo", vector_config=Configure.Vectors.self_provided(), properties=[Property(name="text", data_type=DataType.TEXT)])
    collection.data.insert(properties={"text": "Hello"}, vector=[0.1, 0.2])
    print(collection.query.near_vector(near_vector=[0.1, 0.2], limit=1).objects)

Weaviate examples

From open-source projects on GitHub

Provides the Pinecone Python SDK.

Downloads / mo
4.6M
Stars
457
Last release
10.3.0
License
Apache-2.0

Quickstart

From README.md
$ pip install pinecone==10.3.0
from pinecone import Pinecone
client = Pinecone()
print(client.indexes.list())

Pinecone examples

From open-source projects on GitHub

FAQ

pgvector suits apps that keep vectors beside relational rows in PostgreSQL. Qdrant suits projects that start in local mode and later move to a Qdrant server through the same client API. Chroma suits embedded collections that persist on local disk.

LanceDB stores vectors in embedded, file-backed tables and searches them locally. Its remote and cloud interfaces follow a separate deployment contract.

pgvector adds PostgreSQL vector types, distances, and index support to SQLAlchemy and Python database drivers. The PostgreSQL server needs the vector extension installed separately.

Only with PersistentClient. In-memory Chroma clients lose their data when the process ends.

Chroma suits embedded collections filtered by metadata. Qdrant suits workloads that grow from local mode to a Qdrant server.

For coding agents

Found your vector database library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official