PycURL - Python interface to libcurl
Python C Shell PHP Makefile ApacheConf
Latest commit 9b68678 Dec 30, 2016 @p p committed on GitHub Merge pull request #432 from orenyomtov/patch-1
Fix typo: "pip remove" -> "pip uninstall"
Failed to load latest commit information.
doc Use httpbin over sourceforge, closes #363 Dec 26, 2016
examples Use httpbin over sourceforge, closes #363 Dec 26, 2016
python/curl Fix Curl reuse bug Sep 21, 2016
scripts Syntax fix Jan 2, 2016
src end trashcan sections after calling free Dec 13, 2016
tests Properly check effective python version Dec 16, 2016
winbuild Updating to use openssl 1.1.0 - openssl/libcurl build changes Dec 16, 2016
www URLs: change from HTTP to HTTPS for Aug 17, 2016
.gitignore SSL detection via ctypes Oct 26, 2015
.travis.yml Test against development versions of libcurl Feb 2, 2016
AUTHORS Add recent contributors to authors Dec 16, 2016 Note travis for pull requests in contributing guidelines Dec 31, 2013
COPYING-LGPL COPYING-LGPL: update FSF address Jan 6, 2016
COPYING-MIT 2016 is here Jan 5, 2016
ChangeLog Add --openssl-lib-name for openssl 1.1.0 Dec 16, 2016
INSTALL.rst Fix typo: "pip remove" -> "pip uninstall" Dec 30, 2016 Add winbuild patches to manifest Jan 5, 2016
Makefile Allow overriding of pyflakes executable Nov 8, 2016
README.rst URLs: change from HTTP to HTTPS for Aug 17, 2016
RELEASE-NOTES.rst Preparing 7.43.0 release Feb 3, 2016
requirements-dev-2.4.txt Depend on pyflakes Oct 27, 2015
requirements-dev-2.5.txt Python 2.5 needs simplejson Mar 7, 2013
requirements-dev-3.1.txt Show skipped tests since there are so many Jan 7, 2016
requirements-dev.txt Show skipped tests since there are so many Jan 7, 2016 Add --openssl-lib-name for openssl 1.1.0 Dec 16, 2016 Add --openssl-lib-name for openssl 1.1.0 Dec 16, 2016


PycURL -- A Python Interface To The cURL library

PycURL is a Python interface to libcurl, the multiprotocol file transfer library. Similarly to the urllib Python module, PycURL can be used to fetch objects identified by a URL from a Python program. Beyond simple fetches however PycURL exposes most of the functionality of libcurl, including:

  • Speed - libcurl is very fast and PycURL, being a thin wrapper above libcurl, is very fast as well. PycURL was benchmarked to be several times faster than requests.
  • Features including multiple protocol support, SSL, authentication and proxy options. PycURL supports most of libcurl's callbacks.
  • Multi and share interfaces.
  • Sockets used for network operations, permitting integration of PycURL into the application's I/O loop (e.g., using Tornado).


  • Python 2.6, 2.7 or 3.1 through 3.5.
  • libcurl 7.19.0 or better.


Download source and binary distributions from PyPI or Bintray. Binary wheels are now available for 32 and 64 bit Windows versions.

Please see INSTALL.rst for installation instructions. If installing from a Git checkout, please follow instruction in the Git Checkout section of INSTALL.rst.


Documentation for the most recent PycURL release is available on PycURL website.

Documentation for the development version of PycURL is available here <>.

To build documentation from source, run make docs. Building documentation requires Sphinx to be installed, as well as pycurl extension module built as docstrings are extracted from it. Built documentation is stored in build/doc subdirectory.


For support questions please use curl-and-python mailing list. Mailing list archives are available for your perusal as well.

Although not an official support venue, Stack Overflow has been popular with some PycURL users.

Bugs can be reported via GitHub. Please use GitHub only for bug reports and direct questions to our mailing list instead.

Automated Tests

PycURL comes with an automated test suite. To run the tests, execute:

make test

The suite depends on packages nose and bottle, as well as vsftpd.

Some tests use vsftpd configured to accept anonymous uploads. These tests are not run by default. As configured, vsftpd will allow reads and writes to anything the user running the tests has read and write access. To run vsftpd tests you must explicitly set PYCURL_VSFTPD_PATH variable like so:

# use vsftpd in PATH
export PYCURL_VSFTPD_PATH=vsftpd

# specify full path to vsftpd
export PYCURL_VSFTPD_PATH=/usr/local/libexec/vsftpd

Test Matrix

The test matrix is a separate framework that runs tests on more esoteric configurations. It supports:

  • Testing against Python 2.4, which bottle does not support.
  • Testing against Python compiled without threads, which requires an out of process test server.
  • Testing against locally compiled libcurl with arbitrary options.

To use the test matrix, first start the test server from Python 2.5+ by running:

python -m tests.appmanager

Then in a different shell, and preferably in a separate user account, run the test matrix:

# run ftp tests, etc.
export PYCURL_VSFTPD_PATH=vsftpd
# create a new work directory, preferably not under pycurl tree
mkdir testmatrix
cd testmatrix
# run the matrix specifying absolute path
python /path/to/pycurl/tests/

The test matrix will download, build and install supported Python versions and supported libcurl versions, then run pycurl tests against each combination. To see what the combinations are, look in tests/


For smaller changes:

  1. Fork the repository on Github.
  2. Create a branch off master.
  3. Make your changes.
  4. Write a test which shows that the bug was fixed or that the feature works as expected.
  5. Send a pull request.
  6. Check back after 10-15 minutes to see if tests passed on Travis CI. PycURL supports old Python and libcurl releases and their support is tested on Travis.

For larger changes:

  1. Join the mailing list.
  2. Discuss your proposal on the mailing list.
  3. When consensus is reached, implement it as described above.

Please contribute binary distributions for your system to the downloads repository.


Copyright (C) 2001-2008 by Kjetil Jacobsen <kjetilja at>
Copyright (C) 2001-2008 by Markus F.X.J. Oberhumer <markus at>
Copyright (C) 2013-2016 by Oleg Pudeyev <oleg at>

All rights reserved.

PycURL is dual licensed under the LGPL and an MIT/X derivative license
based on the cURL license.  A full copy of the LGPL license is included
in the file COPYING-LGPL.  A full copy of the MIT/X derivative license is
included in the file COPYING-MIT.  You can redistribute and/or modify PycURL
according to the terms of either license.