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

Example of using async requests #96

Closed
peterbe opened this issue Oct 22, 2016 · 4 comments
Closed

Example of using async requests #96

peterbe opened this issue Oct 22, 2016 · 4 comments

Comments

@peterbe
Copy link

peterbe commented Oct 22, 2016

I actually don't know if it requires a custom requests library or if it's something that can be done "natively" with sanic, but being able to do requests queries async would be awesome. Then you don't have to worry about blocking when doing a sloooow requests.post(...).
Also, something I'm personally interested in, is the ability to use elasticsearch in an async matter.

@argaen
Copy link
Contributor

argaen commented Oct 22, 2016

For elasticsearch you can use https://github.com/aio-libs/aioes.

For async http requests, aiohttp support this, until sanic supports it maybe you can use its http client (I'm not aware if there is another library doing this).

@jackfischer
Copy link
Contributor

Just sent a pull request! #119

channelcat added a commit that referenced this issue Oct 27, 2016
Add example with async http requests (Issue #96)
@EFF
Copy link

EFF commented Nov 9, 2016

Seems like this issue should be closed now.

  • async request question is answered
  • es related question is answered
  • example has been provided and merged

@seemethere
Copy link
Member

closed with #119

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

5 participants