1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
6 <title>PycURL Documentation</title>
7 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
8 <meta name="revisit-after" content="30 days" />
9 <meta name="robots" content="noarchive, index, follow" />
13 <h1><tt>pycurl</tt> — A Python interface to the cURL library</h1>
15 <p>The pycurl package is a Python interface to libcurl (<a
16 href="http://curl.haxx.se/libcurl/">http://curl.haxx.se/libcurl/</a>). pycurl
17 has been successfully built and tested with Python versions from
18 2.2 to the current 2.4.x releases.</p>
20 <p>libcurl is a client-side URL transfer library supporting FTP, FTPS,
21 HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl
22 also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploads, proxies,
23 cookies, basic authentication, file transfer resume of FTP sessions, HTTP
24 proxy tunneling and more.</p>
26 <p>All the functionality provided by libcurl can used through the
27 pycurl interface. The following subsections describe how to use the
28 pycurl interface, and assume familiarity with how libcurl works. For
29 information on how libcurl works, please consult the curl library web pages
30 (<a href="http://curl.haxx.se/libcurl/c/">http://curl.haxx.se/libcurl/c/</a>).</p>
34 <h1>Module Functionality</h1>
37 <dt><code>pycurl.global_init(</code><em>option</em><code>)</code> -><em>None</em></dt>
39 <dd><p><em>option</em> is one of the constants
40 pycurl.GLOBAL_SSL, pycurl.GLOBAL_WIN32, pycurl.GLOBAL_ALL,
41 pycurl.GLOBAL_NOTHING, pycurl.GLOBAL_DEFAULT. Corresponds to
42 <a href="http://curl.haxx.se/libcurl/c/curl_global_init.html"><code>curl_global_init()</code></a> in libcurl.</p>
45 <dt><code>pycurl.global_cleanup()</code> -> <em>None</em></dt>
48 <a href="http://curl.haxx.se/libcurl/c/curl_global_cleanup.html"><code>curl_global_cleanup()</code></a> in libcurl.</p>
51 <dt><code>pycurl.version</code></dt>
53 <dd><p>This is a string with version information on libcurl,
55 <a href="http://curl.haxx.se/libcurl/c/curl_version.html"><code>curl_version()</code></a> in libcurl.</p>
61 'libcurl/7.12.3 OpenSSL/0.9.7e zlib/1.2.2.1 libidn/0.5.12'
65 <dt><code>pycurl.version_info()</code> -> <em>Tuple</em></dt>
68 <a href="http://curl.haxx.se/libcurl/c/curl_version_info.html"><code>curl_version_info()</code></a> in libcurl.
69 Returns a tuple of information which is similar to the
70 <code>curl_version_info_data</code> struct returned by
71 <code>curl_version_info()</code> in libcurl.</p>
76 >>> pycurl.version_info()
77 (2, '7.12.3', 461827, 'i586-pc-linux-gnu', 1565, 'OpenSSL/0.9.7e', 9465951,
78 '1.2.2.1', ('ftp', 'gopher', 'telnet', 'dict', 'ldap', 'http', 'file',
79 'https', 'ftps'), None, 0, '0.5.12')
83 <dt><code>pycurl.Curl()</code> -> <em>Curl object</em></dt>
85 <p>This function creates a new
86 <a href="curlobject.html">Curl object</a> which corresponds to a
87 <code>CURL</code> handle in libcurl. Curl objects automatically
88 set CURLOPT_VERBOSE to 0, CURLOPT_NOPROGRESS to 1,
89 provide a default CURLOPT_USERAGENT and setup
90 CURLOPT_ERRORBUFFER to point to a private error buffer.</p>
93 <dt><code>pycurl.CurlMulti()</code> -> <em>CurlMulti object</em></dt>
95 <p>This function creates a new
96 <a href="curlmultiobject.html">CurlMulti object</a> which corresponds to
97 a <code>CURLM</code> handle in libcurl.</p>
106 <li><a href="curlobject.html">Curl objects</a></li>
107 <li><a href="curlmultiobject.html">CurlMulti objects</a></li>
108 <li><a href="callbacks.html">Callbacks</a></li>
113 <a href="http://validator.w3.org/check/referer"><img align="right"
114 src="http://www.w3.org/Icons/valid-xhtml10"
115 alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a>