Close pinecone.Index() when done?

Maybe I am thinking of it too much in terms of a traditional database connection, but using the Python library, is there a need to close an index reference after using it?

Hi @richd. Technically no, but it is a good programming form to do so. Also, it keeps you in the habit of instantiating your connection periodically rather than trusting that it will still be there later; connections left running for more than 600 seconds without an active query can be disconnected.

1 Like