# Python vector database libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [pgvector](#pgvector) | 43.4M | 1.5K | Oct 2026 | MIT |
| [Qdrant](#qdrant-client) | 15.9M | 1.4K | Oct 2026 | Apache-2.0 |
| [Chroma](#chroma) | 8.7M | 29.7K | May 2026 | Apache-2.0 |
| [sqlite-vec](#sqlite-vec) | 7.6M | 8.3K | Mar 2026 | MIT |
| [LanceDB](#lancedb) | 7.1M | 11.9K | Oct 2026 | Apache-2.0 |
| [turbopuffer](#turbopuffer) | 6.8M | 191 | Oct 2026 | MIT |
| [Weaviate](#weaviate-client) | 5.1M | 230 | Oct 2026 | BSD-3-Clause |
| [Pinecone](#pinecone) | 4.6M | 457 | Nov 2026 | Apache-2.0 |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[pgvector](#pgvector) has the most monthly downloads in this comparison, at 43.4M.

## Capabilities

| Library | In-process local storage | SQL filter expressions |
| --- | --- | --- |
| [pgvector](#pgvector) | No | Yes |
| [Qdrant](#qdrant-client) | Yes | No |
| [Chroma](#chroma) | Yes | No |
| [sqlite-vec](#sqlite-vec) | Yes | Yes |
| [LanceDB](#lancedb) | Yes | Yes |
| [turbopuffer](#turbopuffer) | No | No |
| [Weaviate](#weaviate-client) | No | No |
| [Pinecone](#pinecone) | No | No |

## Libraries

### pgvector

[GitHub](https://github.com/pgvector/pgvector-python) · [PyPI](https://pypi.org/project/pgvector)

Provides pgvector support for Python.

- Downloads / mo: 43.4M
- Stars: 1.5K
- Last release: 0.5.1
- License: MIT
- Capabilities: [From the pgvector docs](https://github.com/pgvector/pgvector-python)

```sh
pip install pgvector==0.5.1 "psycopg[binary]" numpy
```

**Quickstart**

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

```

From [README.md](https://github.com/pgvector/pgvector-python) · [Find projects using pgvector →](https://dashboard.exa.ai/playground/search?q=pgvector%20GitHub%20projects)

### Qdrant

[GitHub](https://github.com/qdrant/qdrant-client) · [PyPI](https://pypi.org/project/qdrant-client) · [Docs](https://github.com/qdrant/qdrant-client/blob/master/README.md)

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
- Capabilities: [From the Qdrant docs](https://github.com/qdrant/qdrant-client/blob/master/README.md)

**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.

**Watch out for**

- **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.

```sh
pip install qdrant-client==1.20.0
```

**run-llama/llama_index** (52.9K stars)

[run-llama/llama_index](https://github.com/run-llama/llama_index) 

```python
def get_nodes(
    self,
    node_ids: Optional[List[str]] = None,
    filters: Optional[MetadataFilters] = None,
    limit: Optional[int] = None,
    shard_identifier: Optional[Any] = None,
) -> List[BaseNode]:
    """
    Get nodes from the index.

    Args:
        node_ids (Optional[List[str]]): List of node IDs to retrieve.
        filters (Optional[MetadataFilters]): Metadata filters to apply.
        limit (Optional[int]): Maximum number of nodes to retrieve.
        shard_identifier (Optional[Any]): Shard identifier for the query.

    Returns:
        List[BaseNode]: List of nodes retrieved from the index.

    """
    should = []
    if node_ids is not None:
        should = [
            HasIdCondition(
                has_id=node_ids,
            )
        ]
        # If we pass a node_ids list,
        # we can limit the search to only those nodes
        # or less if limit is provided
        limit = len(node_ids) if limit is None else min(len(node_ids), limit)

    if filters is not None:
        filter = self._build_subfilter(filters)
        if filter.should is None:
            filter.should = should
        else:
            filter.should.extend(should)
    else:
        filter = Filter(should=should)

    # If we pass an empty list, Qdrant will not return any results
    filter.must = filter.must if filter.must and len(filter.must) > 0 else None
    filter.should = (
        filter.should if filter.should and len(filter.should) > 0 else None
    )
    filter.must_not = (
        filter.must_not if filter.must_not and len(filter.must_not) > 0 else None
    )

    shard_key_selector = (
        self._generate_shard_key_selector(shard_identifier)
        if shard_identifier is not None
        else None
    )

    response = self._client.scroll(
        collection_name=self.collection_name,
        limit=limit or 9999,
        scroll_filter=filter,
        with_vectors=True,
        shard_key_selector=shard_key_selector,
    )

    return self.parse_to_query_result(response[0]).nodes
```

[llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/llama_index/vector_stores/qdrant/base.py](https://github.com/run-llama/llama_index/blob/99d7433f6f71888951379ccca9294e272442c832/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/llama_index/vector_stores/qdrant/base.py) · [More projects using Qdrant →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20qdrant-client%20for%20indexing%2C%20filtering%20and%20vector%20retrieval&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

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

```

From [README.md](https://github.com/qdrant/qdrant-client/blob/master/README.md)

### Chroma

[GitHub](https://github.com/chroma-core/chroma) · [PyPI](https://pypi.org/project/chromadb) · [Docs](https://docs.trychroma.com/docs/overview/getting-started)

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
- Capabilities: [From the Chroma docs](https://docs.trychroma.com/docs/overview/getting-started)

**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.

**Watch out for**

- **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.

```sh
pip install chromadb==1.5.9
```

**run-llama/llama_index** (52.9K stars)

[run-llama/llama_index](https://github.com/run-llama/llama_index) 

```python
def _query(
    self, query_embeddings: List["float"], n_results: int, where: dict, **kwargs
) -> VectorStoreQueryResult:
    if where:
        results = self._collection.query(
            query_embeddings=query_embeddings,
            n_results=n_results,
            where=where,
            **kwargs,
        )
    else:
        results = self._collection.query(
            query_embeddings=query_embeddings,
            n_results=n_results,
            **kwargs,
        )

    logger.debug(f"> Top {len(results['documents'][0])} nodes:")
    nodes = []
    similarities = []
    ids = []
    for node_id, text, metadata, distance in zip(
        results["ids"][0],
        results["documents"][0],
        results["metadatas"][0],
        results["distances"][0],
    ):
        try:
            node = metadata_dict_to_node(metadata, text=text)
        except Exception:
            # NOTE: deprecated legacy logic for backward compatibility
            metadata, node_info, relationships = legacy_metadata_dict_to_node(
                metadata
            )

            node = TextNode(
                text=text or "",
                id_=node_id,
                metadata=metadata,
                start_char_idx=node_info.get("start", None),
                end_char_idx=node_info.get("end", None),
                relationships=relationships,
            )

        nodes.append(node)

        similarity_score = math.exp(-distance)
        similarities.append(similarity_score)

        logger.debug(
            f"> [Node {node_id}] [Similarity score: {similarity_score}] "
            f"{truncate_text(str(text), 100)}"
        )
        ids.append(node_id)

    return VectorStoreQueryResult(nodes=nodes, similarities=similarities, ids=ids)
```

[llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/base.py](https://github.com/run-llama/llama_index/blob/99d7433f6f71888951379ccca9294e272442c832/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/base.py) · [More projects using Chroma →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20chromadb%20for%20indexing%2C%20filtering%20and%20vector%20retrieval&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

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

```

From [README.md](https://docs.trychroma.com/docs/overview/getting-started)

### sqlite-vec

[GitHub](https://github.com/asg017/sqlite-vec) · [PyPI](https://pypi.org/project/sqlite-vec)

Adds vector search to SQLite as an extension.

- Downloads / mo: 7.6M
- Stars: 8.3K
- Last release: 0.1.9
- License: MIT
- Capabilities: [From the sqlite-vec docs](https://github.com/asg017/sqlite-vec)

```sh
pip install sqlite-vec==0.1.9
```

**semantica-agi/semantica** (14.7K stars)

[semantica-agi/semantica](https://github.com/semantica-agi/semantica) 

```python
def update(
    self,
    ids: List[str],
    vectors: Optional[Union[List[np.ndarray], np.ndarray]] = None,
    metadata: Optional[List[Dict[str, Any]]] = None,
) -> List[str]:
    """
    Update existing vectors.

    Args:
        ids: List of vector IDs to update
        vectors: Optional new vectors
        metadata: Optional new metadata

    Returns:
        IDs the UPDATE matched, in request order and without
        duplicates. Missing IDs are omitted. An empty request
        returns an empty list.

    Raises:
        ValidationError: If input dimensions or lengths don't match
        ProcessingError: If read-only mode is active or database operation fails
    """
    if not ids:
        return []

    if self.read_only:
        raise ProcessingError("Cannot update vectors in read-only mode")

    if vectors is None and metadata is None:
        raise ValidationError(
            "Either vectors or metadata must be provided for update"
        )

    if vectors is not None:
        if isinstance(vectors, np.ndarray):
            vectors = [vectors[i] for i in range(len(vectors))]
        if len(vectors) != len(ids):
            raise ValidationError("Vectors length must match IDs length")
        for i, vec in enumerate(vectors):
            if len(vec) != self.dimension:
                raise ValidationError(
                    f"Vector at index {i} has dimension {len(vec)}, expected {self.dimension}"
                )

    if metadata is not None and len(metadata) != len(ids):
        raise ValidationError("Metadata length must match IDs length")

    with self._lock, self._get_connection() as conn:
        try:
            cur = conn.cursor()

            # Same columns are updated for every row. Execute one
            # statement per id: vec0 virtual tables reject UPDATE
            # RETURNING, and executemany reports only a combined count.
            if vectors is not None and metadata is not None:
                update_sql = f"UPDATE {self.table_name} SET embedding = ?, metadata = ? WHERE id = ?"
                data_tuples = [
                    (sqlite_vec.serialize_float32(vectors[i]), json.dumps(metadata[i]), vec_id)
                    for i, vec_id in enumerate(ids)
                ]
            elif vectors is not None:
                update_sql = f"UPDATE {self.table_name} SET embedding = ? WHERE id = ?"
                data_tuples = [
                    (sqlite_vec.serialize_float32(vectors[i]), vec_id)
                    for i, vec_id in enumerate(ids)
                ]
            else:
                update_sql = f"UPDATE {self.table_name} SET metadata = ? WHERE id = ?"
                data_tuples = [
                    (json.dumps(metadata[i]), vec_id) for i, vec_id in enumerate(ids)
                ]

            confirmed_ids: List[str] = []
            seen = set()
            for params in data_tuples:
                cur.execute(update_sql, params)
                vec_id = params[-1]
                if cur.rowcount > 0 and vec_id not in seen:
                    seen.add(vec_id)
                    confirmed_ids.append(vec_id)
            conn.commit()
            cur.close()
            self.logger.info(f"Updated {len(confirmed_ids)} of {len(ids)} vectors")
            return confirmed_ids
        except ValidationError:
            conn.rollback()
            raise
        except Exception as e:
            conn.rollback()
            raise ProcessingError("Failed to update vectors") from e
```

[semantica/vector_store/sqlite_vec_store.py](https://github.com/semantica-agi/semantica/blob/4d83266ca0d7f70185906bfce7c96ec71c6ebc04/semantica/vector_store/sqlite_vec_store.py) · [More projects using sqlite-vec →](https://dashboard.exa.ai/playground/search?q=sqlite-vec%20GitHub%20projects)

**Quickstart**

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

```

From [README.md](https://github.com/asg017/sqlite-vec)

### LanceDB

[GitHub](https://github.com/lancedb/lancedb) · [PyPI](https://pypi.org/project/lancedb) · [Docs](https://lancedb.github.io/lancedb/python/python/)

Provides the LanceDB Python package.

- Downloads / mo: 7.1M
- Stars: 11.9K
- Last release: 0.41.0
- License: Apache-2.0
- Capabilities: [From the LanceDB docs](https://lancedb.github.io/lancedb/python/python/)

```sh
pip install lancedb==0.41.0
```

**run-llama/llama_index** (52.9K stars)

[run-llama/llama_index](https://github.com/run-llama/llama_index) 

```python
def query(
    self,
    query: VectorStoreQuery,
    **kwargs: Any,
) -> VectorStoreQueryResult:
    """Query index for top k most similar nodes."""
    if query.filters is not None:
        if "where" in kwargs:
            raise ValueError(
                "Cannot specify filter via both query and kwargs. "
                "Use kwargs only for lancedb specific items that are "
                "not supported via the generic query interface."
            )
        where = _to_lance_filter(query.filters, self._metadata_keys)
    else:
        where = kwargs.pop("where", None)

    query_type = kwargs.pop("query_type", self.query_type)

    _logger.info(f"query_type :, {query_type}")

    if query_type == "vector":
        _query = query.query_embedding
    else:
        if not isinstance(self.table, lancedb.db.LanceTable):
            raise ValueError(
                "creating FTS index is not supported for LanceDB Cloud yet. "
                "Please use a local table for FTS/Hybrid search."
            )
        if not self._fts_index_ready:
            self.table.create_fts_index(self.text_key, replace=True)
            self._fts_index_ready = True

        if query_type == "hybrid":
            _query = (query.query_embedding, query.query_str)
        elif query_type == "fts":
            _query = query.query_str
        else:
            raise ValueError(f"Invalid query type: {query_type}")

    if query_type == "hybrid":
        lance_query = (
            self.table.search(
                vector_column_name=self.vector_column_name, query_type="hybrid"
            )
            .vector(query.query_embedding)
            .text(query.query_str)
        )
    else:
        lance_query = self.table.search(
            query=_query,
            vector_column_name=self.vector_column_name,
        )
    lance_query.limit(query.similarity_top_k * self.overfetch_factor).where(where)

    if query_type != "fts":
        lance_query.nprobes(self.nprobes)
        if query_type == "hybrid" and self._reranker is not None:
            _logger.info(f"using {self._reranker} for reranking results.")
            lance_query.rerank(reranker=self._reranker)

    if self.refine_factor is not None:
        lance_query.refine_factor(self.refine_factor)

    results = lance_query.to_pandas()

    if len(results) == 0:
        raise Warning("query results are empty..")

    nodes = []

    for _, item in results.iterrows():
        try:
            node = metadata_dict_to_node(item.metadata)
            node.embedding = list(item[self.vector_column_name])
        except Exception:
            # deprecated legacy logic for backward compatibility
            _logger.debug(
                "Failed to parse Node metadata, fallback to legacy logic."
            )
            if item.metadata:
                metadata, node_info, _relation = legacy_metadata_dict_to_node(
                    item.metadata, text_key=self.text_key
                )
            else:
                metadata, node_info = {}, {}
            node = TextNode(
                text=item[self.text_key] or "",
                id_=item.id,
                metadata=metadata,
                start_char_idx=node_info.get("start"),
                end_char_idx=node_info.get("end"),
                relationships={
                    NodeRelationship.SOURCE: RelatedNodeInfo(
                        node_id=item[self.doc_id_key]
                    ),
                },
            )

        nodes.append(node)

    return VectorStoreQueryResult(
        nodes=nodes,
        similarities=_to_llama_similarities(results),
        ids=results["id"].tolist(),
    )
```

[llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py](https://github.com/run-llama/llama_index/blob/99d7433f6f71888951379ccca9294e272442c832/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py) · [More projects using LanceDB →](https://dashboard.exa.ai/playground/search?q=lancedb%20GitHub%20projects)

**Quickstart**

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

```

From [README.md](https://lancedb.github.io/lancedb/python/python/)

### turbopuffer

[GitHub](https://github.com/turbopuffer/turbopuffer-python) · [PyPI](https://pypi.org/project/turbopuffer)

Provides the official Python library for the turbopuffer API.

- Downloads / mo: 6.8M
- Stars: 191
- Last release: 3.1.0
- License: MIT
- Capabilities: [From the turbopuffer docs](https://github.com/turbopuffer/turbopuffer-python)

```sh
pip install turbopuffer==3.1.0
```

**mem0ai/mem0** (69.2K stars)

[mem0ai/mem0](https://github.com/mem0ai/mem0) 

```python
def search(
    self, query: str, vectors: List[float], top_k: int = 5, filters: Optional[Dict] = None
) -> List[OutputData]:
    """
    Search for similar vectors.

    Args:
        query (str): Query text (unused in vector search, kept for interface consistency).
        vectors (list): Query vector to search with.
        top_k (int, optional): Number of results to return. Defaults to 5.
        filters (dict, optional): Filters to apply to the search. Defaults to None.

    Returns:
        list: Search results.
    """
    query_params = {
        "rank_by": ("vector", "ANN", vectors),
        "top_k": top_k,
        "include_attributes": True,
    }

    tpuf_filters = self._convert_filters(filters)
    if tpuf_filters is not None:
        query_params["filters"] = tpuf_filters

    response = self.namespace.query(**query_params)
    return self._parse_output(response.rows or [])
```

[mem0/vector_stores/turbopuffer.py](https://github.com/mem0ai/mem0/blob/fff8a6472512d1bc1a4bccab8c645b65a1df7fe5/mem0/vector_stores/turbopuffer.py) · [More projects using turbopuffer →](https://dashboard.exa.ai/playground/search?q=turbopuffer%20GitHub%20projects)

**Quickstart**

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

```

From [README.md](https://github.com/turbopuffer/turbopuffer-python)

### Weaviate

[GitHub](https://github.com/weaviate/weaviate-python-client) · [PyPI](https://pypi.org/project/weaviate-client) · [Docs](https://docs.weaviate.io/weaviate/client-libraries/python)

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
- Capabilities: [From the Weaviate docs](https://docs.weaviate.io/weaviate/client-libraries/python)

**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.

**Watch out for**

- **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.

```sh
pip install weaviate-client==4.24.1
```

**run-llama/llama_index** (52.9K stars)

[run-llama/llama_index](https://github.com/run-llama/llama_index) 

```python
def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResult:
    """Query index for top k most similar nodes."""
    collection = self.client.collections.get(self.index_name)
    property_types = self._get_property_types()
    query_parameters = self.get_query_parameters(
        query, property_types=property_types, **kwargs
    )

    # execute query
    try:
        query_result = collection.query.hybrid(**query_parameters)
    except weaviate.exceptions.WeaviateQueryError as e:
        raise ValueError(f"Invalid query, got errors: {e.message}")

    # parse results
    return self.parse_query_result(query_result, query)
```

[llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py](https://github.com/run-llama/llama_index/blob/99d7433f6f71888951379ccca9294e272442c832/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py) · [More projects using Weaviate →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20weaviate-client%20for%20indexing%2C%20filtering%20and%20vector%20retrieval&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

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

```

From [quickstart.byov.all.py](https://docs.weaviate.io/weaviate/client-libraries/python)

### Pinecone

[GitHub](https://github.com/pinecone-io/python-sdk) · [PyPI](https://pypi.org/project/pinecone) · [Docs](https://github.com/pinecone-io/pinecone-python-client)

Provides the Pinecone Python SDK.

- Downloads / mo: 4.6M
- Stars: 457
- Last release: 10.3.0
- License: Apache-2.0
- Capabilities: [From the Pinecone docs](https://github.com/pinecone-io/pinecone-python-client)

```sh
pip install pinecone==10.3.0
```

**mem0ai/mem0** (69.2K stars)

[mem0ai/mem0](https://github.com/mem0ai/mem0) 

```python
def search(
    self, query: str, vectors: List[float], top_k: int = 5, filters: Optional[Dict] = None
) -> List[OutputData]:
    """
    Search for similar vectors.

    Args:
        query (str): Query.
        vectors (list): List of vectors to search.
        top_k (int, optional): Number of results to return. Defaults to 5.
        filters (dict, optional): Filters to apply to the search. Defaults to None.

    Returns:
        list: Search results.
    """
    filter_dict = self._create_filter(filters) if filters else None

    query_params = {
        "vector": vectors,
        "top_k": top_k,
        "include_metadata": True,
        "include_values": False,
    }

    if filter_dict:
        query_params["filter"] = filter_dict

    if self.hybrid_search and self.sparse_encoder and filters and "text" in filters:
        query_text = filters.get("text")
        if query_text:
            sparse_vector = self.sparse_encoder.encode_queries(query_text)
            query_params["sparse_vector"] = sparse_vector

    response = self.index.query(**query_params, namespace=self.namespace)

    results = self._parse_output(response.matches)
    return results
```

[mem0/vector_stores/pinecone.py](https://github.com/mem0ai/mem0/blob/fff8a6472512d1bc1a4bccab8c645b65a1df7fe5/mem0/vector_stores/pinecone.py) · [More projects using Pinecone →](https://dashboard.exa.ai/playground/search?q=pinecone%20GitHub%20projects)

**Quickstart**

```python
from pinecone import Pinecone
client = Pinecone()
print(client.indexes.list())

```

From [README.md](https://github.com/pinecone-io/pinecone-python-client)

## FAQ

### Which Python vector database library should I use?

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

### What is LanceDB?

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

### How do I use pgvector with Python?

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

### Does Chroma keep data between runs?

Only with PersistentClient. In-memory [Chroma](#chroma) clients lose their data when the process ends.

### Chroma vs Qdrant: which should I use?

[Chroma](#chroma) suits embedded collections filtered by metadata. [Qdrant](#qdrant-client) suits workloads that grow from local mode to a Qdrant server.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python vector database libraries Qdrant Chroma PyMilvus Weaviate code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
