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: Async Client for Python #452

Closed
2 tasks done
ms7m opened this issue May 24, 2022 · 2 comments
Closed
2 tasks done

🚀 Feature: Async Client for Python #452

ms7m opened this issue May 24, 2022 · 2 comments
Assignees

Comments

@ms7m
Copy link

ms7m commented May 24, 2022

🔖 Feature description

An async client for the python-sdk.

🎤 Pitch

I'm planning to move over a couple of applications I maintain to Appwrite, and while in the process of moving I noticed the python-sdk client is non-asynchronous. Mainly due to requests being used as the http client.

A little bit of background: The applications I maintain are mostly FastAPI-based and they recommend any I/O based libraries to be asynchronous for better performance..


I've already got a p.o.c fork and opened a PR #453 which passes all tests. This is a very initial version and I definitely make some time to optimize it further, but I think it's a good starting point.

There are a number of changes.

  • Breaking: Moving from requests to httpx. Httpx is mostly requests-compatible as well contains both a sync and async client.

    • I removed requests to keep the dependency count low, but I can understand if certain people are unable to install.. Maybe we can publish a spealized version of the sdk with async support? e.g: pip install appwrite[async]?
  • Async Client and functions is available under appwrite.aio and any I/O related functions must be called with await.

There is a lot of room to further optimize, such as maybe using AnyIO for users who use Trio instead of asyncio.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90
Copy link
Contributor

@ms7m, can your description be added to appwrite/sdk-for-python#26 and then we close out this issue as a duplicate since there's a longer history/conversation in that issue?

@stnguyen90 stnguyen90 self-assigned this Oct 14, 2022
@stnguyen90
Copy link
Contributor

Closing due to inactivity and duplicate

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants