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:
Download source and binary distributions from PyPI . 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.
PycURL comes with an automated test suite. To run the tests, execute:
make testThe suite depends on packages pytest and flask, 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/vsftpdThe test matrix is a separate framework that runs tests on more esoteric configurations. It supports:
To use the test matrix, first start the test server from Python 2.5+ by running:
python -m tests.appmanagerThen 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/matrix.pyThe 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/matrix.py.
For smaller changes:
For larger changes:
Please contribute binary distributions for your system to the downloads repository.
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.