pinecone 7.3.0


pip install pinecone

  Latest version

Released: Jun 27, 2025


Meta
Author: Pinecone Systems, Inc.
Requires Python: >=3.9,<4.0

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers
  • Information Technology
  • Science/Research
  • System Administrators

License
  • OSI Approved :: Apache Software License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Database
  • Software Development
  • Software Development :: Libraries
  • Software Development :: Libraries :: Application Frameworks
  • Software Development :: Libraries :: Python Modules

Pinecone Python SDK

License CI

The official Pinecone Python SDK.

Documentation

Upgrading the SDK

[!NOTE] The official SDK package was renamed from pinecone-client to pinecone beginning in version 5.1.0. Please remove pinecone-client from your project dependencies and add pinecone instead to get the latest updates.

For notes on changes between major versions, see Upgrading

Prerequisites

  • The Pinecone Python SDK is compatible with Python 3.9 and greater. It has been tested with CPython versions from 3.9 to 3.13.
  • Before you can use the Pinecone SDK, you must sign up for an account and find your API key in the Pinecone console dashboard at https://app.pinecone.io.

Installation

The Pinecone Python SDK is distributed on PyPI using the package name pinecone. By default the pinecone has a minimal set of dependencies, but you can install some extras to unlock additional functionality.

Available extras:

  • pinecone[asyncio] will add a dependency on aiohttp and enable usage of PineconeAsyncio, the asyncio-enabled version of the client for use with highly asynchronous modern web frameworks such as FastAPI.
  • pinecone[grpc] will add dependencies on grpcio and related libraries needed to make pinecone data calls such as upsert and query over GRPC for a modest performance improvement. See the guide on tuning performance.

Installing with pip

# Install the latest version
pip3 install pinecone

# Install the latest version, with optional dependencies
pip3 install "pinecone[asyncio,grpc]"

Installing with uv

uv is a modern package manager that runs 10-100x faster than pip and supports most pip syntax.

# Install the latest version
uv add pinecone

# Install the latest version, optional dependencies
uv add "pinecone[asyncio,grpc]"

Installing with poetry

# Install the latest version
poetry add pinecone

# Install the latest version, with optional dependencies
poetry add pinecone --extras asyncio --extras grpc

Quickstart

Bringing your own vectors to Pinecone

from pinecone import (
    Pinecone,
    ServerlessSpec,
    CloudProvider,
    AwsRegion,
    VectorType
)

# 1. Instantiate the Pinecone client
pc = Pinecone(api_key='YOUR_API_KEY')

# 2. Create an index
index_config = pc.create_index(
    name="index-name",
    dimension=1536,
    spec=ServerlessSpec(
        cloud=CloudProvider.AWS,
        region=AwsRegion.US_EAST_1
    ),
    vector_type=VectorType.DENSE
)

# 3. Instantiate an Index client
idx = pc.Index(host=index_config.host)

# 4. Upsert embeddings
idx.upsert(
    vectors=[
        ("id1", [0.1, 0.2, 0.3, 0.4, ...], {"metadata_key": "value1"}),
        ("id2", [0.2, 0.3, 0.4, 0.5, ...], {"metadata_key": "value2"}),
    ],
    namespace="example-namespace"
)

# 5. Query your index using an embedding
query_embedding = [...] # list should have length == index dimension
idx.query(
    vector=query_embedding,
    top_k=10,
    include_metadata=True,
    filter={"metadata_key": { "$eq": "value1" }}
)

Bring your own data using Pinecone integrated inference

from pinecone import (
    Pinecone,
    CloudProvider,
    AwsRegion,
    EmbedModel,
)

# 1. Instantiate the Pinecone client
pc = Pinecone(api_key="<<PINECONE_API_KEY>>")

# 2. Create an index configured for use with a particular model
index_config = pc.create_index_for_model(
    name="my-model-index",
    cloud=CloudProvider.AWS,
    region=AwsRegion.US_EAST_1,
    embed=IndexEmbed(
        model=EmbedModel.Multilingual_E5_Large,
        field_map={"text": "my_text_field"}
    )
)

# 3. Instantiate an Index client
idx = pc.Index(host=index_config.host)

# 4. Upsert records
idx.upsert_records(
    namespace="my-namespace",
    records=[
        {
            "_id": "test1",
            "my_text_field": "Apple is a popular fruit known for its sweetness and crisp texture.",
        },
        {
            "_id": "test2",
            "my_text_field": "The tech company Apple is known for its innovative products like the iPhone.",
        },
        {
            "_id": "test3",
            "my_text_field": "Many people enjoy eating apples as a healthy snack.",
        },
        {
            "_id": "test4",
            "my_text_field": "Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces.",
        },
        {
            "_id": "test5",
            "my_text_field": "An apple a day keeps the doctor away, as the saying goes.",
        },
        {
            "_id": "test6",
            "my_text_field": "Apple Computer Company was founded on April 1, 1976, by Steve Jobs, Steve Wozniak, and Ronald Wayne as a partnership.",
        },
    ],
)

# 5. Search for similar records
from pinecone import SearchQuery, SearchRerank, RerankModel

response = index.search_records(
    namespace="my-namespace",
    query=SearchQuery(
        inputs={
            "text": "Apple corporation",
        },
        top_k=3
    ),
    rerank=SearchRerank(
        model=RerankModel.Bge_Reranker_V2_M3,
        rank_fields=["my_text_field"],
        top_n=3,
    ),
)

Pinecone Assistant

Installing the Pinecone Assistant Python plugin

The pinecone-plugin-assistant package is now bundled by default when installing pinecone. It does not need to be installed separately in order to use Pinecone Assistant.

For more information on Pinecone Assistant, see the Pinecone Assistant documentation.

More information on usage

Detailed information on specific ways of using the SDK are covered in these other pages.

Issues & Bugs

If you notice bugs or have feedback, please file an issue.

You can also get help in the Pinecone Community Forum.

Contributing

If you'd like to make a contribution, or get setup locally to develop the Pinecone Python SDK, please see our contributing guide

7.3.1a1 Oct 03, 2025
7.3.1.dev8 Oct 01, 2025
7.3.1.dev7 Oct 01, 2025
7.3.1.dev6 Oct 01, 2025
7.3.1.dev5 Oct 01, 2025
7.3.1.dev4 Sep 30, 2025
7.3.1.dev3 Sep 25, 2025
7.3.1.dev2 Sep 24, 2025
7.3.1.dev1 Sep 24, 2025
7.3.0 Jun 27, 2025
7.2.0 Jun 18, 2025
7.1.0 Jun 16, 2025
7.1.0rc1 Jun 16, 2025
7.0.2 May 28, 2025
7.0.2.dev1 May 27, 2025
7.0.1 May 21, 2025
7.0.1.dev1 May 21, 2025
7.0.0 May 20, 2025
7.0.0.dev3 May 16, 2025
7.0.0.dev2 May 15, 2025
7.0.0.dev1 May 15, 2025
6.0.3.dev1 May 21, 2025
6.0.2 Mar 13, 2025
6.0.2.dev1 Mar 13, 2025
6.0.1 Feb 10, 2025
6.0.1.dev1 Feb 10, 2025
6.0.0 Feb 07, 2025
6.0.0rc2 Oct 22, 2024
6.0.0rc1 Oct 21, 2024
6.0.0.dev9 Feb 03, 2025
6.0.0.dev8 Jan 31, 2025
6.0.0.dev7 Jan 30, 2025
6.0.0.dev6 Dec 17, 2024
6.0.0.dev5 Dec 17, 2024
6.0.0.dev4 Dec 13, 2024
6.0.0.dev3 Oct 25, 2024
6.0.0.dev2 Oct 25, 2024
6.0.0.dev1 Oct 18, 2024
5.4.2 Dec 09, 2024
5.4.1 Nov 26, 2024
5.4.0 Nov 13, 2024
5.4.0.dev5 Nov 13, 2024
5.4.0.dev4 Oct 25, 2024
5.4.0.dev3 Oct 25, 2024
5.4.0.dev2 Oct 25, 2024
5.4.0.dev1 Oct 22, 2024
5.3.1 Sep 19, 2024
5.3.0 Sep 18, 2024
5.2.0 Sep 17, 2024
5.2.0.dev10 Sep 17, 2024
5.2.0.dev9 Sep 17, 2024
5.2.0.dev8 Sep 17, 2024
5.2.0.dev7 Sep 09, 2024
5.2.0.dev6 Sep 06, 2024
5.2.0.dev5 Sep 05, 2024
5.2.0.dev4 Sep 05, 2024
5.2.0.dev3 Sep 05, 2024
5.2.0.dev2 Aug 30, 2024
5.2.0.dev1 Aug 30, 2024
5.2.0.dev0 Aug 30, 2024
5.1.0 Aug 29, 2024
5.1.0rc1 Aug 28, 2024
5.1.0.dev1 Aug 29, 2024
5.0.1 Aug 12, 2024
5.0.0 Jul 31, 2024
4.1.2 Jul 31, 2024
4.1.1 Jul 31, 2024
4.1.0 Jul 31, 2024
4.0.0 May 03, 2024
3.2.2 Jul 31, 2024
3.2.1 Jul 31, 2024
3.2.0 Jul 31, 2024
3.1.0 Jul 31, 2024
3.0.3 Jul 31, 2024
3.0.2 Jul 31, 2024
3.0.1 Jul 31, 2024
3.0.0 Jul 31, 2024
2.2.4 Jul 31, 2024
2.2.3 Jul 31, 2024
2.2.2 Jul 31, 2024

Wheel compatibility matrix

Platform Python 3
any

Files in release