Skip to main content

Python wrapper for picohttpparser

Project description


pycohttpparser is a Python wrapper library around the excellent picohttpparser C library. It aims to provide a speedy C implementation of the HTTP/1.1 parsing API used in the hyper project. Using CFFI, it supports both CPython 2.7 and 3.4, and PyPy.

To get started with pycohttpparser, simply install it from the cheeseshop:

$ pip install pycohttpparser

You’ll need to make sure your system is set up for using CFFI. For more information, consult CFFI’s documentation.

Then, you can start parsing your HTTP messages! For example:

>>> import pycohttpparser.api as p
>>> message = socket.recv()
>>> m = memoryview(data)
>>> c = p.Parser()
>>> r = c.parse_request(m)
>>> r.method.tobytes()
>>> r.path.tobytes()

For more information, see the documentation.


The Python wrapper library here is licensed under the MIT license. See LICENSE for more details.

The original picohttpparser C code, which is included in this project in its entirety, is licensed under the MIT license. See the source files or the NOTICES file for more details.


The python wrapper library is maintained by Cory Benfield.

picohttpparser is maintained by the picohttpparser team: see NOTICES for more.

Release History

1.0.0 (2015-03-21)

  • Initial release.

  • Contains picohttpparser at revision 98bcc1c3b431d05d4584af66082da48e4638a675

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycohttpparser-1.0.0.tar.gz (18.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page