Aysnc support for query operation for python client

Hi, I am trying to incorporate pinecone into my backend service, but I find out that the query operation can only be called synchronously through python client. Is that a language problem or any other reason , because I saw the node client does support async. Besides, On v2, I saw async support for the underlying __query call but the doc Is not well documented, and what is the returned “thread”? To my understanding, python async runtime is single thread, and not being able to just await it makes the whole async chain not workable.

4 Likes

Hey @algoExpert, if you’re still looking for guidance here - we’ve just shipped v6 of the Python client which now supports asyncio, allowing you to make the asynchronous operations you mention here. Learn more here: Python SDK - Pinecone Docs

1 Like

For anyone who comes across this post, I’ve shared a full example of how to work with the Python SDK in an async way here. This is specifically for FastAPI, but should be transferable to other frameworks.