Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Async Client #6

Open
olirice opened this issue Jun 1, 2023 · 4 comments
Open

Feature Request: Async Client #6

olirice opened this issue Jun 1, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@olirice
Copy link
Collaborator

olirice commented Jun 1, 2023

Feature Request: Async Client

Most of what vecs manages involves interacting with a database over a network. Sqlalchemy and psycopg2 both support async operations but vecs does not. Creating an async client would unblock the python interpreter while waiting on those external systems and would enable much better performance in async environments e.g. an async enabled web server like FastAPI. That use case will be particularly important if vecs users deploy the Collection.query or Collection.upsert methods behind an API

Potential Usage:

vx = await vecs.create_async_client(DB_CONNECTION)
...
docs = await vx.create_collection(name="docs", dimension=3)
...
# same for `upsert`, `create_index`, and `query`
@olirice olirice added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 1, 2023
@anand2312
Copy link

We use unasync in the supabase python libraries (except for supabase-py) to expose both a sync and async interface - but unasync generates synchronous code from an asynchronous codebase, while we already have a synchronous codebase here

I'm a maintainer for the supabase python community libraries, I'd be happy to help here 😄

@olirice
Copy link
Collaborator Author

olirice commented Jun 9, 2023

hi @anand2312

thanks! I'll take a look at unasync, thats an interesting approach
in the short term I think we'll want to make sure the overall API is stable before introducing the async interface but that could be a good option

@zimmy-upstage
Copy link

@olirice Do you have any plans to add this feature?

@olirice
Copy link
Collaborator Author

olirice commented Dec 2, 2024

it hasn't been scheduled for development yet. we'd be open to outside contributions if you're interested in working towards a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants