Skip to main content

How To Find Pinecone Index Dimensions

In this article we will develop a Python script that can display the name and dimension size of indexes defined in Pinecone.

Procedure

  1. From the terminal install Pinecone
pip install "pinecone[grpc]"
  1. Create a text file called .env, within the text file create a variable PINECONE_API_KEY = followed by your Pinecone api key.

  2. Create a python script called pinecone-list-indexes.py.

  3. Execute the python from the terminal

python pinecone-list-indexes.py

The output will display the index name, dimension and configured meta data.

alt text

Adverts