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

Async support (asyncio, Twisted, etc.) #483

Open
glyph opened this issue Oct 26, 2018 · 3 comments
Open

Async support (asyncio, Twisted, etc.) #483

glyph opened this issue Oct 26, 2018 · 3 comments

Comments

@glyph
Copy link

glyph commented Oct 26, 2018

I'd love a version of call_on_each_event that would not block, and instead register a callable with a reactor.

This could probably be combined with fairly general / framework agnostic async support by having the existing implementation be converted into a coroutine which awaits different kinds of things (treq requests in the Twisted case, synchronously-returning coroutines that just call requests in the default / existing case, aiohttp Futures for asyncio).

@neiljp
Copy link
Contributor

neiljp commented Oct 27, 2018

Would it be accurate to describe this as asking for non-blocking support in the python API?

@timabbott
Copy link
Member

I think @kcr's https://github.com/1ts-org/snipe/blob/master/snipe/zulip.py#L127 has some work that could be borrowed/extracted for this (since snipe is a Python cross-protocol IM client that uses asyncio).

@glyph
Copy link
Author

glyph commented Dec 5, 2018

Would it be accurate to describe this as asking for non-blocking support in the python API?

Yep; any form of modern asyncio/tornado/Twisted support could ultimately be converted into this, and could therefore close this ticket.

@gnprice gnprice changed the title twisted support? Async support (asyncio, Twisted, etc.) Nov 10, 2021
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

3 participants