Skip to content

Commit 68cc561

Browse files
committed
Add list indexes sample to README.md.
1 parent 16cea5c commit 68cc561

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,17 @@ metadata_config = {
5050
pinecone.create_index("example-index-2", dimension=1024,
5151
metadata_config=metadata_config)
5252
```
53+
54+
## List indexes
55+
56+
The following example returns all indexes in your project.
57+
58+
```python
59+
import pinecone
60+
61+
pinecone.init(api_key="YOUR_API_KEY", environment="us-west1-gcp")
62+
63+
active_indexes = pinecone.list_indexes()
64+
```
65+
66+

0 commit comments

Comments
 (0)