docs/reference/grpc.rst
Obtain a GrpcIndex instance via :meth:pinecone.Pinecone.index with
grpc=True, or construct one directly.
.. code-block:: python
from pinecone import Pinecone
pc = Pinecone(api_key="your-api-key")
idx = pc.index("my-index", grpc=True)
from pinecone.grpc import GrpcIndex idx = GrpcIndex(host="my-index-abc123.svc.pinecone.io", api_key="your-api-key")
GrpcIndex exposes the same data-plane operations as
:class:~pinecone.index.Index but uses gRPC transport (backed by a Rust
extension) and returns :class:~pinecone.grpc.future.PineconeFuture objects
from the *_async() methods.
Method groups:
~pinecone.grpc.GrpcIndex.upsert,
:meth:~pinecone.grpc.GrpcIndex.upsert_from_dataframe,
:meth:~pinecone.grpc.GrpcIndex.upsert_records,
:meth:~pinecone.grpc.GrpcIndex.query,
:meth:~pinecone.grpc.GrpcIndex.fetch,
:meth:~pinecone.grpc.GrpcIndex.update,
:meth:~pinecone.grpc.GrpcIndex.delete,
:meth:~pinecone.grpc.GrpcIndex.list,
:meth:~pinecone.grpc.GrpcIndex.list_paginated~pinecone.grpc.GrpcIndex.describe_index_stats~pinecone.grpc.GrpcIndex.search,
:meth:~pinecone.grpc.GrpcIndex.search_records~pinecone.grpc.GrpcIndex.upsert_async,
:meth:~pinecone.grpc.GrpcIndex.query_async,
:meth:~pinecone.grpc.GrpcIndex.fetch_async,
:meth:~pinecone.grpc.GrpcIndex.delete_async~pinecone.grpc.GrpcIndex.close.. autoclass:: pinecone.grpc.GrpcIndex :members: :undoc-members: False :show-inheritance: :special-members: init, enter, exit :member-order: bysource
*_async() methods on :class:GrpcIndex return a
:class:~pinecone.grpc.future.PineconeFuture which is fully compatible with
:func:concurrent.futures.as_completed and :func:concurrent.futures.wait.
.. autoclass:: pinecone.grpc.future.PineconeFuture :members: :undoc-members: False :show-inheritance: