Skip to main content

pycohttpparser

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()
b'POST'
>>> r.path.tobytes()
b'/post'

For more information, see the documentation.

License

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.

Maintainers

The python wrapper library is maintained by Cory Benfield.

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

Release History

1.1.0 (2016-02-18)

  • Update to CFFI 1.0.0.

  • Bring picohttpparser up to 408186196312fd46b1fbea78d8e7b6c9f42ef8e3

1.0.0 (2015-03-21)

  • Initial release.

  • Contains picohttpparser at revision 98bcc1c3b431d05d4584af66082da48e4638a675

Metadata

Release files for pycohttpparser 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycohttpparser 1.1.0
File Size Uploaded
pycohttpparser-1.1.0.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycohttpparser 1.1.0
File Interpreter ABI Platform
pycohttpparser-1.1.0-cp27-none-macosx_10_11_x86_64.whl CPython 2.7 none macOS 10.11+ x86-64 Details

Total release size: 24.7 kB

Release files / pycohttpparser-1.1.0.tar.gz

Download URL pycohttpparser-1.1.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c439369ddeed1a33cf00176eb960bd1a53a7e762dd44f3091df59fd5cda9509a
BLAKE2b-256 checksum
How to use checksums
f7cbeab1268ac4751352a5181541658164ac1139c8732491d89b07af15eccb06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pycohttpparser-1.1.0-cp27-none-macosx_10_11_x86_64.whl

Download URL pycohttpparser-1.1.0-cp27-none-macosx_10_11_x86_64.whl
Size 13.1 kB
Tags CPython 2.7 macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
30bf4a980420b20014ce2fe68d84b11072b01602e0b222517b99181e6e7105a8
BLAKE2b-256 checksum
How to use checksums
fe0fd30cb017224a3e584d3cb2198152edcc61b23af1c59552b1140587e0995c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

1 release file

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page