Asynchronous Requests with Python requests

前端 未结 12 1398
予麋鹿
予麋鹿 2020-11-22 08:47

I tried the sample provided within the documentation of the requests library for python.

With async.map(rs), I get the response codes, but I want to get

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 09:15

    I have been using python requests for async calls against github's gist API for some time.

    For an example, see the code here:

    https://github.com/davidthewatson/flasgist/blob/master/views.py#L60-72

    This style of python may not be the clearest example, but I can assure you that the code works. Let me know if this is confusing to you and I will document it.

提交回复
热议问题