PycURL - Python interface to libcurl

Related tags

HTTP Clientspycurl
Overview

PycURL -- A Python Interface To The cURL library

https://api.travis-ci.org/pycurl/pycurl.png https://ci.appveyor.com/api/projects/status/q40v2q8r5d06bu92/branch/master?svg=true

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).

Requirements

  • Python 3.5-3.8.
  • libcurl 7.19.0 or better.

Installation

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

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.

Support

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/matrix.py

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/matrix.py.

Contribute

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.

License

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

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.
Single-file replacement for python-requests

mureq mureq is a single-file, zero-dependency replacement for python-requests, intended to be vendored in-tree by Linux systems software and other lig

Shivaram Lingamneni 267 Dec 28, 2022
Python requests like API built on top of Twisted's HTTP client.

treq: High-level Twisted HTTP Client API treq is an HTTP library inspired by requests but written on top of Twisted's Agents. It provides a simple, hi

Twisted Matrix Labs 553 Dec 18, 2022
Some example code for using a raspberry pi to draw text (including emojis) and twitch emotes to a HUB75 RGB matrix via an HTTP post endpoint.

Some example code for using a raspberry pi to draw text (including emojis) and twitch emotes to a HUB75 RGB matrix via an HTTP post endpoint.

7 Nov 05, 2022
Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Paweł Piotr Przeradowski 8.6k Jan 04, 2023
A modern/fast python SOAP client based on lxml / requests

Zeep: Python SOAP client A fast and modern Python SOAP client Highlights: Compatible with Python 3.6, 3.7, 3.8 and PyPy Build on top of lxml and reque

Michael van Tellingen 1.7k Jan 01, 2023
Fast HTTP parser

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools. APIs httptools contains two classes

magicstack 1.1k Jan 07, 2023
Requests + Gevent = <3

GRequests: Asynchronous Requests GRequests allows you to use Requests with Gevent to make asynchronous HTTP Requests easily. Note: You should probably

Spencer Phillip Young 4.2k Dec 30, 2022
EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, parallel or even single requests

EasyRequests EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, paralle

Avi 1 Jan 27, 2022
Python Client for the Etsy NodeJS Statsd Server

Introduction statsd is a client for Etsy's statsd server, a front end/proxy for the Graphite stats collection and graphing server. Links The source: h

Rick van Hattem 107 Jun 09, 2022
Python package for caching HTTP response based on etag

Etag cache implementation for HTTP requests, to save request bandwidth for a non-modified response. Returns high-speed accessed dictionary data as cache.

Rakesh R 2 Apr 27, 2022
Aiosonic - lightweight Python asyncio http client

aiosonic - lightweight Python asyncio http client Very fast, lightweight Python asyncio http client Here is some documentation. There is a performance

Johanderson Mogollon 93 Jan 06, 2023
Probe and discover HTTP pathname using brute-force methodology and filtered by specific word or 2 words at once

pathprober Probe and discover HTTP pathname using brute-force methodology and filtered by specific word or 2 words at once. Purpose Brute-forcing webs

NFA 41 Jul 06, 2022
HTTP Request Smuggling Detection Tool

HTTP Request Smuggling Detection Tool HTTP request smuggling is a high severity vulnerability which is a technique where an attacker smuggles an ambig

Anshuman Pattnaik 282 Jan 03, 2023
Detects request smuggling via HTTP/2 downgrades.

h2rs Detects request smuggling via HTTP/2 downgrades. Requirements Python 3.x Python Modules base64 sys socket ssl certifi h2.connection h2.events arg

Ricardo Iramar dos Santos 89 Dec 22, 2022
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.

urllib3 is a powerful, user-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too. urllib3 brings many

urllib3 3.2k Dec 29, 2022
A simple, yet elegant HTTP library.

Requests Requests is a simple, yet elegant HTTP library. import requests r = requests.get('https://api.github.com/user', auth=('user', 'pass')

Python Software Foundation 48.8k Jan 05, 2023
curl statistics made simple

httpstat httpstat visualizes curl(1) statistics in a way of beauty and clarity. It is a single file 🌟 Python script that has no dependency 👏 and is

Xiao Meng 5.3k Jan 04, 2023
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Jan 01, 2023
r - a small subset of Python Requests

r a small subset of Python Requests a few years ago, when I was first learning Python and looking for http functionality, i found the batteries-includ

Gabriel Sroka 4 Dec 15, 2022
PycURL - Python interface to libcurl

PycURL -- A Python Interface To The cURL library PycURL is a Python interface to libcurl, the multiprotocol file transfer library. Similarly to the ur

PycURL 933 Jan 09, 2023