From 72c667fc5018f858ea0e14f7894759821144cdff Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 20 Jul 2021 16:05:38 -0400 Subject: document pycurl vs requests, closes #309 --- doc/index.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index d407692..60845b0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -23,6 +23,33 @@ libcurl, including: .. _Tornado: http://www.tornadoweb.org/ +PycURL vs Requests +------------------ + +`Requests `_ is another popular Python +library that is frequently compared to PycURL. + +Advantages of PycURL: + +- PycURL can be `several times faster than Requests + `_. + The performance difference is larger when there are multiple requests + performed and connections are reused. +- PycURL makes it possible to take advantage of I/O multiplexing via the + `libcurl multi interface `_. +- PycURL supports many protocols, not just HTTP. +- PycURL generally provides more features, for example ability to use several + TLS backends, more authentication options, etc. + +Advantages of Requests: + +- Requests is written in pure Python and does not require C extensions. + As a result, Requests is trivial to install while PycURL's installation + can be complex (though operating system-specific packages, if available, + negate this drawback). +- Requests' API is generally easier to learn and use than PycURL's. + + About libcurl ------------- -- cgit v1.2.1