Python Requests vs PyCurl Performance

前端 未结 4 1100
抹茶落季
抹茶落季 2020-11-29 18:31

How does the Requests library compare with the PyCurl performance wise?

My understanding is that Requests is a python wrapper for urllib whereas PyCurl is a python

4条回答
  •  -上瘾入骨i
    2020-11-29 19:04

    First and foremost, requests is built on top of the urllib3 library, the stdlib urllib or urllib2 libraries are not used at all.

    There is little point in comparing requests with pycurl on performance. pycurl may use C code for its work but like all network programming, your execution speed depends largely on the network that separates your machine from the target server. Moreover, the target server could be slow to respond.

    In the end, requests has a far more friendly API to work with, and you'll find that you'll be more productive using that friendlier API.

提交回复
热议问题