Push parser for HTTP 1.x
Project description
httparse
Python wrapper for Rust's httparse. See this project on GitHub.
Example
from httparse import RequestParser
parser = RequestParser()
buff = b"GET /index.html HTTP/1.1\r\nHost"
parsed = parser.parse(buff)
assert parsed is None
# a partial request, so we try again once we have more data
buff = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n"
parsed = parser.parse(buff)
assert parsed is not None
assert parsed.method == "GET"
assert parsed.path == "/index.html"
assert parsed.version == 1
assert parsed.body_start_offset == len(buff)
headers = [(h.name.encode(), h.value) for h in parsed.headers]
assert headers == [(b"Host", b"example.domain")]
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
httparse-0.1.2.tar.gz
(10.1 kB
view hashes)
Built Distributions
httparse-0.1.2-cp37-abi3-win32.whl
(128.4 kB
view hashes)
Close
Hashes for httparse-0.1.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6172f3adedb30742d7949f2be146554bcc34e49bae95ed4d9f34736f27f747 |
|
MD5 | 4d09c7909577730bb07e611878b5492b |
|
BLAKE2b-256 | 28b195a5ef09c0054adc9b75b4b0b54a70ab7e9e25ce01c39e6c5287ef8fb315 |
Close
Hashes for httparse-0.1.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f9ffc93ee43d1d8d4c2c2d1586710b88e0befab1baf45050ee6025daa560a9e |
|
MD5 | e651593f7a23a0b19a86da66f978f3c3 |
|
BLAKE2b-256 | e7d8ae385a3a1b879de8488929d43acbdf54ee6bd1c379e90df2da099b4c85ff |
Close
Hashes for httparse-0.1.2-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551aa9ea9d79ed1e59d64d12764975a7f4343aab4f9fcc08bb7c27a598c70543 |
|
MD5 | 804ec75da79bd7ce288b9dbd52c26813 |
|
BLAKE2b-256 | 29bf4415ca6a8281f004a4439d1fc463a90c5f348a84e7c7455a8474d3f3bb8b |
Close
Hashes for httparse-0.1.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af571ed8ce56d644f89e18355b3df90cd4ff112258b007fef07d449f19194e9 |
|
MD5 | b746ebb5aa3260677993d2ada27d8e5a |
|
BLAKE2b-256 | 2cc733fb631edd476234cffe98ca8fab8ef59ef22159897fcdeb05f565540b71 |
Close
Hashes for httparse-0.1.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58057743a579587529df7a6cbd0ad582a558ba06c1058e84b9c8408ebe8dae81 |
|
MD5 | 92e15f206683e4402ddc39727443aa88 |
|
BLAKE2b-256 | 7b83781691f2815895f804921b7723466601cc53e88418281c20e1024364f6d9 |
Close
Hashes for httparse-0.1.2-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300549b5a1016417c701386a4ea50061d892676a0cff0fbd457d1d325cffd321 |
|
MD5 | 513e08c884b68b4effd3b39a63089fe8 |
|
BLAKE2b-256 | 2309af84230c2a3409ef85b309a42d31bc1ef166c75531c81706e92bfd022c3e |
Close
Hashes for httparse-0.1.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c91ac95c50746b185f13d22a36216bd05a3a76e6cbc5b3e0f2527ec0ce09230 |
|
MD5 | e2c580edc362727fae51c043919a2267 |
|
BLAKE2b-256 | e2e392ee4ae255a941b7e39c0cd2998e3bc840bb9ebf454c03e55c9bb11e1df0 |
Close
Hashes for httparse-0.1.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f19b19ffbe7b2c4fc22cc2005c8b9dd49f179c3ec60d3c17902c2702edc4544 |
|
MD5 | a379f0509284f8ab2481ec507764bae9 |
|
BLAKE2b-256 | cc40d8bba851cd446ad7402303f7b036eea8a52df492c2f037e7bb2013aeab50 |
Close
Hashes for httparse-0.1.2-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121236f47aefcd2554598dd9686d57d82e7f9f5b7ae8a0b846f88e669b3936b8 |
|
MD5 | ab52b6bf3aa534b65ef889247b78e194 |
|
BLAKE2b-256 | d3aab6fb29d5f2146da78478f00a95254adb73f9ad0957f62ad29017a35ee3f9 |
Close
Hashes for httparse-0.1.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f1844ff312f6e51ce71ef06d47ae0c534ef1c2d91ec0d36520649f9fd52c667 |
|
MD5 | ac7534ccee382231434324b1e5106255 |
|
BLAKE2b-256 | 1720dfba6889fa06c665608cb0bffc15e56f288acbda282f18a1918bc7c711fc |
Close
Hashes for httparse-0.1.2-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 398d66682583492779209b83c245049675a0ca03548d9d1e6624d9700c4d7d85 |
|
MD5 | 238b0a8d94b4e44afe0aadb13ac93650 |
|
BLAKE2b-256 | 3b7282824220bb144d3d354fa9d3c12bca22dedacfb04efc36c5d0f2d2ca58bc |
Close
Hashes for httparse-0.1.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13285a706b89a27bc78320ecfeb2b04d967d0b714cbb2e2b08c11f3da887367c |
|
MD5 | 3360a2ac0d5458de44836703245ab9d1 |
|
BLAKE2b-256 | 74aec6f07b34708d9f77646e82edcb1c4059b5b3e4a6ded4e020ebf31626f78f |
Close
Hashes for httparse-0.1.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53a56b0b6ce41b70de1d2d9ebd7548b0647c7b069832f6aebafd0c1aeaddd3fa |
|
MD5 | fae4788f11bb65b5690929a39eb13bd0 |
|
BLAKE2b-256 | adb5262ef6754d2d5af4cb65e3fc98f85e0a8f39e2f5c2c7a9ec8a8727365ea9 |
Close
Hashes for httparse-0.1.2-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b74cf1c72244b09bc2f5ae0fa0cef4ec4fff0d2f9d7e6b07fbb7d81043f6b483 |
|
MD5 | 4cd6d6a5b492a42dcc6cffd445362413 |
|
BLAKE2b-256 | 341a72e3b01fff4242638c7170f01911d00a3e24e54d8b8b0ad03929d0af1343 |
Close
Hashes for httparse-0.1.2-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17b1eb154608718f7083d247b881556d0589ff549b6003dfa3c9ba4419bee63b |
|
MD5 | 71e372e574a31a29125f1b5a9074c77b |
|
BLAKE2b-256 | 3f5bfec30bb8c506cb446250bac586ed921e35a0058c1b8bdf513a43fb080604 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce81210ceb13f431d11ffb70801f45f823d23561b76ede04ebc6dad8f693dcf3 |
|
MD5 | 03112ba161ebab18b9ac20145f30154f |
|
BLAKE2b-256 | b9321b4b40b8354ba0fbfe2a0dee392648bb8118734794295b999ff6e097d4f2 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4eedd95f38a6c3804fe83ba6c60996899ca201c15f09cbccd1805b12ad65dc6 |
|
MD5 | 607f00c18d3c2a1e376e1551d2b55a7b |
|
BLAKE2b-256 | 7845e2dca3d0bb2322412c94785dd7cea6135825cdeb0a3458bd84afba2e4410 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6519f747d7bd0314a6eb6bb49b8d888203fc5b4b84494e54f4e98ea3e6a49144 |
|
MD5 | 464d1168703b9932a98b2a1bfbca2c3b |
|
BLAKE2b-256 | dfc313d1277bcc685738c1f873a833c7c48f6ae4592bee4d8a9c5a9191ae827e |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2556b1fd4e3eb5cd66d1b87f844c18ec02aaeea81290583232ed76ab1f88355 |
|
MD5 | bbf0eb426bb8a45e34de1689218611ae |
|
BLAKE2b-256 | c07aa73c9f749679351d1293e2342e4ef382c2550cc5a06248ab7fff92b31710 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b940eeb53fc319fe93d5f2024e3719bfd5a8e5d8c0f21a8ebaaae97549fe80ff |
|
MD5 | 0974c14aa4bcc32119724d40d8062c8b |
|
BLAKE2b-256 | 5ff90342628c7ab76f39c7f6e46b537b3dae3053f50bd3b379aab112204422a3 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9ad15fae9a5afa7d5bfd980e2c003a2ffcbd69e1b441935629cd32f0c40484 |
|
MD5 | 16c96185d297a16a0f81d59507311193 |
|
BLAKE2b-256 | 934543b8f20c0561da5329ab16a02b00209cf25cd23fe95c42f0fe153ed14740 |
Close
Hashes for httparse-0.1.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ea6eb05a134aa1776e2487e80b63249cd103ced7d61608007e3657448a5205 |
|
MD5 | 564270a6e01c2f9ef7ce4e605a238d52 |
|
BLAKE2b-256 | e8cca5e24c1ac4db081d77bebb6743e74ce08d2a989909a71c6b24f4178360ab |
Close
Hashes for httparse-0.1.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff642afbcb98bf6d2758fc6beb41c8070bd2eee8281454cc07579e06c53ce64a |
|
MD5 | 58542b37b8bb1df3568537d73edd2609 |
|
BLAKE2b-256 | c8e501568d644805a1052d15d712d065f1aa02be538910496d0ab2cad3a1e89e |
Close
Hashes for httparse-0.1.2-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55a00ac057d2d62246f1c5dea6f50650b7e6b5a757c77c319c2a977e1184d985 |
|
MD5 | 6e47cc57396f3497f2a28631379e19cd |
|
BLAKE2b-256 | 88398df316d5b56613a364bfdd9b423285727710eab0ab8f3aab6d73b9a81c89 |