PycURL

# `pycurl` -- A Python interface to the cURL library

The pycurl package is a Python interface to libcurl (http://curl.haxx.se/libcurl/). pycurl has been successfully built and tested with Python versions from 1.5.2 to the current 2.X releases.
libcurl is a client-side URL transfer library supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploads, proxies, cookies, basic authentication, file transfer resume of FTP sessions, HTTP proxy tunneling and more.
All the functionality provided by libcurl can used through the pycurl interface. The following subsections describe how to use the pycurl interface, and assume familiarity with how libcurl works. For information on how libcurl works, please consult the curl library web pages (http://curl.haxx.se/libcurl/using/).

## Module Functionality

pycurl.global_init(option) -> None

> option is one of the constants pycurl.GLOBAL_SSL, pycurl.GLOBAL_WIN32, pycurl.GLOBAL_ALL, pycurl.GLOBAL_NOTHING, pycurl.GLOBAL_DEFAULT. Corresponds to curl_global_init() in libcurl.

pycurl.global_cleanup() -> None

> Corresponds to curl_global_cleanup() in libcurl.

pycurl.version_info() -> Result

> Corresponds to curl_version_info() in libcurl. Result is a list of information which is similar to the curl_version_info_data struct returned by curl_version_info() in libcurl.
> Example usage:

>     >>> import pycurl
>     >>> pycurl.version_info()
>     (0, '7.10.2', 461314, 'i686-pc-linux-gnu', 12, 'OpenSSL/0.9.6', 9461775, '1.1.3',
>     ('ftp', 'gopher', 'telnet', 'dict', 'ldap', 'http', 'file', 'https', 'ftps'))

pycurl.version

> This is a string with version information on libcurl which is linked and used by pycurl, corresponding to curl_version() in libcurl.
> Example usage:

>     >>> import pycurl
>     >>> pycurl.version
>     'libcurl 7.9.8 (OpenSSL 0.9.6)'

pycurl.Curl() -> Curl object

> This function returns a Curl object which corresponds to a CURL handle in libcurl. Curl objects automatically set CURLOPT_VERBOSE to 0, CURLOPT_NOPROGRESS to 1 and CURLOPT_ERRORBUFFER to point to a private error buffer.

pycurl.CurlMulti() -> CurlMulti object

> This function returns a CurlMulti object which corresponds to a CURLM handle in libcurl.

### Subsections

- Curl objects
- CurlMulti objects
- Callbacks