Skip to content

Commit 94d5c7b

Browse files
authored
Update README (#578)
## Problem Some examples in the README contained errors ## Solution Fix broken examples, tidy up the text. ## Type of Change - [x] Non-code change (docs, etc) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Major README overhaul for clarity and correctness. > > - Adds badges, feature list, and a structured Table of Contents > - Clarifies installation with base vs optional extras, adds `uv`, and notes API key configuration > - Fixes and expands Quickstart examples: BYOV flow (`create_index`, `Index`, `upsert`, `query`) and integrated inference (`create_index_for_model`, `IndexEmbed`, `upsert_records`, `search_records`); corrects variable names/usages > - Adds Pinecone Assistant note (bundled by default) and reorganizes "More information" links into Index Management, Data Operations, and Advanced Features sections > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f34ba4e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent f245236 commit 94d5c7b

File tree

1 file changed

+71
-22
lines changed

1 file changed

+71
-22
lines changed

README.md

Lines changed: 71 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
# Pinecone Python SDK
2-
![License](https://img.shields.io/github/license/pinecone-io/pinecone-python-client?color=orange) [![CI](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml/badge.svg)](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml)
2+
![License](https://img.shields.io/github/license/pinecone-io/pinecone-python-client?color=orange) [![CI](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml/badge.svg)](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml) [![PyPI version](https://img.shields.io/pypi/v/pinecone.svg)](https://pypi.org/project/pinecone/) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
33

4-
The official Pinecone Python SDK.
4+
The official Pinecone Python SDK for building vector search applications with AI/ML.
5+
6+
Pinecone is a vector database that makes it easy to add vector search to production applications. Use Pinecone to store, search, and manage high-dimensional vectors for applications like semantic search, recommendation systems, and RAG (Retrieval-Augmented Generation).
7+
8+
## Features
9+
10+
- **Vector Operations**: Store, query, and manage high-dimensional vectors with metadata filtering
11+
- **Serverless & Pod Indexes**: Choose between serverless (auto-scaling) or pod-based (dedicated) indexes
12+
- **Integrated Inference**: Built-in embedding and reranking models for end-to-end search workflows
13+
- **Async Support**: Full asyncio support with `PineconeAsyncio` for modern Python applications
14+
- **GRPC Support**: Optional GRPC transport for improved performance
15+
- **Type Safety**: Full type hints and type checking support
16+
17+
## Table of Contents
18+
19+
- [Documentation](#documentation)
20+
- [Prerequisites](#prerequisites)
21+
- [Installation](#installation)
22+
- [Quickstart](#quickstart)
23+
- [Bringing your own vectors](#bringing-your-own-vectors-to-pinecone)
24+
- [Bring your own data using Pinecone integrated inference](#bring-your-own-data-using-pinecone-integrated-inference)
25+
- [Pinecone Assistant](#pinecone-assistant)
26+
- [More Information](#more-information-on-usage)
27+
- [Issues & Bugs](#issues--bugs)
28+
- [Contributing](#contributing)
529

630
## Documentation
731

@@ -24,12 +48,21 @@ For notes on changes between major versions, see [Upgrading](./docs/upgrading.md
2448

2549
## Installation
2650

27-
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.
51+
The Pinecone Python SDK is distributed on PyPI using the package name `pinecone`. The base installation includes everything you need to get started with vector operations, but you can install optional extras to unlock additional functionality.
52+
53+
**Base installation includes:**
54+
- Core Pinecone client (`Pinecone`)
55+
- Vector operations (upsert, query, fetch, delete)
56+
- Index management (create, list, describe, delete)
57+
- Metadata filtering
58+
- Pinecone Assistant plugin
59+
60+
**Optional extras:**
2861

29-
Available extras:
62+
- `pinecone[asyncio]` - Adds `aiohttp` dependency and enables `PineconeAsyncio` for async/await support. Use this if you're building applications with FastAPI, aiohttp, or other async frameworks.
63+
- `pinecone[grpc]` - Adds `grpcio` and related libraries for GRPC transport. Provides modest performance improvements for data operations like `upsert` and `query`. See the guide on [tuning performance](https://docs.pinecone.io/docs/performance-tuning).
3064

31-
- `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.
32-
- `pinecone[grpc]` will add dependencies on `grpcio` and related libraries needed to make pinecone data calls such as `upsert` and `query` over [GRPC](https://grpc.io/) for a modest performance improvement. See the guide on [tuning performance](https://docs.pinecone.io/docs/performance-tuning).
65+
**Configuration:** The SDK can read your API key from the `PINECONE_API_KEY` environment variable, or you can pass it directly when instantiating the client.
3366

3467
#### Installing with pip
3568

@@ -63,9 +96,11 @@ poetry add pinecone
6396
poetry add pinecone --extras asyncio --extras grpc
6497
```
6598

66-
# Quickstart
99+
## Quickstart
67100

68-
## Bringing your own vectors to Pinecone
101+
### Bringing your own vectors to Pinecone
102+
103+
This example shows how to create an index, add vectors with embeddings you've generated, and query them. This approach gives you full control over your embedding model and vector generation process.
69104

70105
```python
71106
from pinecone import (
@@ -77,8 +112,12 @@ from pinecone import (
77112
)
78113

79114
# 1. Instantiate the Pinecone client
115+
# Option A: Pass API key directly
80116
pc = Pinecone(api_key='YOUR_API_KEY')
81117

118+
# Option B: Use environment variable (PINECONE_API_KEY)
119+
# pc = Pinecone()
120+
82121
# 2. Create an index
83122
index_config = pc.create_index(
84123
name="index-name",
@@ -112,20 +151,25 @@ idx.query(
112151
)
113152
```
114153

115-
## Bring your own data using Pinecone integrated inference
154+
### Bring your own data using Pinecone integrated inference
155+
156+
This example demonstrates using Pinecone's integrated inference capabilities. You provide raw text data, and Pinecone handles embedding generation and optional reranking automatically. This is ideal when you want to focus on your data and let Pinecone handle the ML complexity.
116157

117158
```python
118159
from pinecone import (
119160
Pinecone,
120161
CloudProvider,
121162
AwsRegion,
122163
EmbedModel,
164+
IndexEmbed,
123165
)
124166

125167
# 1. Instantiate the Pinecone client
126-
pc = Pinecone(api_key="<<PINECONE_API_KEY>>")
168+
# The API key can be passed directly or read from PINECONE_API_KEY environment variable
169+
pc = Pinecone(api_key='YOUR_API_KEY')
127170

128-
# 2. Create an index configured for use with a particular model
171+
# 2. Create an index configured for use with a particular embedding model
172+
# This sets up the index with the right dimensions and configuration for your chosen model
129173
index_config = pc.create_index_for_model(
130174
name="my-model-index",
131175
cloud=CloudProvider.AWS,
@@ -136,10 +180,11 @@ index_config = pc.create_index_for_model(
136180
)
137181
)
138182

139-
# 3. Instantiate an Index client
183+
# 3. Instantiate an Index client for data operations
140184
idx = pc.Index(host=index_config.host)
141185

142-
# 4. Upsert records
186+
# 4. Upsert records with raw text data
187+
# Pinecone will automatically generate embeddings using the configured model
143188
idx.upsert_records(
144189
namespace="my-namespace",
145190
records=[
@@ -170,10 +215,11 @@ idx.upsert_records(
170215
],
171216
)
172217

173-
# 5. Search for similar records
218+
# 5. Search for similar records using text queries
219+
# Pinecone handles embedding the query and optionally reranking results
174220
from pinecone import SearchQuery, SearchRerank, RerankModel
175221

176-
response = index.search_records(
222+
response = idx.search_records(
177223
namespace="my-namespace",
178224
query=SearchQuery(
179225
inputs={
@@ -199,15 +245,18 @@ For more information on Pinecone Assistant, see the [Pinecone Assistant document
199245

200246
## More information on usage
201247

202-
Detailed information on specific ways of using the SDK are covered in these other pages.
248+
Detailed information on specific ways of using the SDK are covered in these guides:
249+
250+
**Index Management:**
251+
- [Serverless Indexes](./docs/db_control/serverless-indexes.md) - Learn about auto-scaling serverless indexes that scale automatically with your workload
252+
- [Pod Indexes](./docs/db_control/pod-indexes.md) - Understand dedicated pod-based indexes for consistent performance
203253

204-
- Store and query your vectors
205-
- [Serverless Indexes](./docs/db_control/serverless-indexes.md)
206-
- [Pod Indexes](./docs/db_control/pod-indexes.md)
207-
- [Working with vectors](./docs/db_data/index-usage-byov.md)
254+
**Data Operations:**
255+
- [Working with vectors](./docs/db_data/index-usage-byov.md) - Comprehensive guide to storing, querying, and managing vectors with metadata filtering
208256

209-
- [Inference API](./docs/inference-api.md)
210-
- [FAQ](./docs/faq.md)
257+
**Advanced Features:**
258+
- [Inference API](./docs/inference-api.md) - Use Pinecone's integrated embedding and reranking models
259+
- [FAQ](./docs/faq.md) - Common questions and troubleshooting tips
211260

212261

213262
# Issues & Bugs

0 commit comments

Comments
 (0)