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
Suggestion: Asynchronous Support #46
Comments
Hi @nfnfgo, that is right, currently only synchronous calls are possible because the library is based on We would like to add asynchronous functionality to this library in future. |
I think the fastest solution for now could be to generate async client based on available OpenAPI specification. But yes, it's nice to have officially supported "async" version |
@daniel-jones-deepl if this library would use httpx, it could support both sync and async easily. It has API most similar to |
Are there any further updates on if this will be happening/the current status? |
+1 for async support. aiohttp or httpx |
+1 |
Just wanna add, it seems like a single file, the http client file, that needs to be updated. Shouldn't be that hard for anyone who wants this and has some time. (this is directed towards non-maintainers looking at this) |
Hi everyone, thanks for adding your interest on this feature. (Note: this is @daniel-jones-deepl, I've migrated to my personal account). I had a quick look into this, Regarding only changing the file http_client.py: it would be an option. Another user implemented a DeepL Python library using something similar. However it doesn't allow proper typing support. I think the best way to support async would be add a new class On Friday I have some time to work on that more, I'll post another update then. |
@daniel-jones-dev Heck yeah! This will make lots of Discord bot developers (who like accessibility through readily available translations) happy |
I've pushed some WIP changes to the async branch, and I'd be interested in feedback. Lots of things are broken (see below), but the following should work with
Currently only Anyway, feedback is welcome! |
It really a nice thing to hear DeepL provide a Python client module.
Through the doc I found that this module seems not support async functions, and I think it would be better to use a async request module such as aiohttp to make the translation can be used asynchronously
The text was updated successfully, but these errors were encountered: