Skip to main content

Push parser for HTTP 1.x

Project description

httparse

CI

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.2.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distributions

httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (198.4 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

httparse-0.2.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl (193.1 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (198.6 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

httparse-0.2.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl (192.8 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (214.8 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (200.3 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

httparse-0.2.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl (194.9 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

httparse-0.2.1-cp37-abi3-win_amd64.whl (137.5 kB view details)

Uploaded CPython 3.7+ Windows x86-64

httparse-0.2.1-cp37-abi3-win32.whl (131.5 kB view details)

Uploaded CPython 3.7+ Windows x86

httparse-0.2.1-cp37-abi3-musllinux_1_2_x86_64.whl (384.0 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

httparse-0.2.1-cp37-abi3-musllinux_1_2_i686.whl (406.0 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

httparse-0.2.1-cp37-abi3-musllinux_1_2_armv7l.whl (461.0 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

httparse-0.2.1-cp37-abi3-musllinux_1_2_aarch64.whl (378.4 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

httparse-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212.5 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

httparse-0.2.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (267.8 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (295.2 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (308.2 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

httparse-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (198.0 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

httparse-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (198.2 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

httparse-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (232.1 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

httparse-0.2.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (378.1 kB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

httparse-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl (189.9 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

Details for the file httparse-0.2.1.tar.gz.

File metadata

  • Download URL: httparse-0.2.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for httparse-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0a616df38c5cb22af5a7fb8f6698c7801839557b0f1fb0fe15a3ab7031a81f6c
MD5 39af36edb3c116ba4124495237205e5c
BLAKE2b-256 85dd828a7f5d0f053ca096c1e4d817fabf48afe976824f4f2c17a224d0b3cc7a

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcf62e06cbb7d1b0435d7dbf9a8028b43baac78c9fd939b1190604925a100b6a
MD5 8eebdbbf75ba793a243606a723915a47
BLAKE2b-256 f95cc480e7a044d4e4cb118c8d1cee4285277098ab1b5a30b720be894836013f

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d21e31b3cd42d0992c208385fead26134a9f385b0fb02e5a6926d754c940660
MD5 f889f5e2f13bd7c7e05c01ed725ff573
BLAKE2b-256 31a3268078ca09e9f4efd998ce934c0b59229cd5abe840739522a7286a760122

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f8b239d4fe3226b0506965077c8477b7b2987f595d24e3f63b2de0b136d86431
MD5 bbfa714c046e173480189b9243657cab
BLAKE2b-256 10774aef698d464244207e44b1ba2e33636565d88ec00274d295870e2d57795a

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9deda75013e5b282bad0f4985077660cdf5075b8e7e3d334470b4d7dc5c57cc
MD5 ba05cfe6633aaf53f5d30f340df7f074
BLAKE2b-256 3f8e63071285fa7ee0d73dee0a1f7f275734bf8d7b2a09ad4cdea795767fa393

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 119aed5d6a5eb143d41af91ef6f2d30de0bb3f22493b97d7093cabd93cbed12c
MD5 9164b85d3cdd031d4237462b82571d9a
BLAKE2b-256 a85ff645ea5528e080f863ad7fa36ae237b67e5e2dc9cb1e9941e3af8bd0a1aa

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e328b4479514cf15f92730ea28509dda79f54bc45c5f20beedb5298e7a20bb47
MD5 3b6f1a7ba19054db96bebdf68b7a96af
BLAKE2b-256 39628c6aadf8bcf3a34321810490e4c01cd44d837daf3bbddbf7dc813a97763f

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f81bc3c298e3b8d3347be1fa3d0da4f9aa9ca9b7144376cc0c07b4ae1ea8459
MD5 318a6991f8e6c9cefd713d7c1264a26e
BLAKE2b-256 f02d4946a642a9026ff0646e437bd90245577b2ad7632aacec0b1721084d2bd3

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d3be7c9dec9f9379cf70738d4a191fe506ae5b7c26d426ff73d3ae8a31aa1dbe
MD5 158aa4e951a39013e271f67d2b42ea81
BLAKE2b-256 fade333eacfc90b5c4ac6cd6a36ae39b193da6582a54c480339110a539420603

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 3b9b4144540dc624e9725e2155571d76840dc46823d8d84d85b891f44266339c
MD5 7cdebe8c3bf943728d8befe6c830ed36
BLAKE2b-256 831ea8b4b19f71fb2e20f924fe857ca8908efb630451efad6337d274cf32773a

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: httparse-0.2.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 137.5 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for httparse-0.2.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f2ab12e7ad160bf2e4ca6628ec6982d7e19bbcc9d2c5fe2f678db9eb8198bffd
MD5 f05cbd5d4d25fd837822c0be903f6d13
BLAKE2b-256 c73c9d6f0ead29318c70f71036d5bb50c50e29accbe9a00cf9bfdefdc9f73d0d

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-win32.whl.

File metadata

  • Download URL: httparse-0.2.1-cp37-abi3-win32.whl
  • Upload date:
  • Size: 131.5 kB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for httparse-0.2.1-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 f1a215ac26476dde41e7fbe448f7d09757bc867ccee6348b126ee415382e39c4
MD5 20f82e7548616fa01b608edb3aa2dd0f
BLAKE2b-256 62990249fd8dcae4c82815bf205398f2c3c073f0271294a99ca580add33df7a8

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8f1455720295410439fe83e896b7537ad49933ddb90edb2c3c092945ab81def6
MD5 4e62dfb5e8eea7db189e9f9872bc5435
BLAKE2b-256 e9112c8ba83ad1e479fc27d2f2bf3688487f54cae843c93b5f5d4e4851396b66

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cd306fffa5adb44dbc8518749a7e3d0bc789442ac9f726bed05bc93a3501f5d8
MD5 0a2c19348f90d39608954d8866de5ec9
BLAKE2b-256 15ef62821b0daf53193f1beaeb9ebbe28e4a7d552e0adea23a0c47251a0f965e

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 2ab0f4a35f80e42e84bd35dc982e381263d2a19a0447e290ace76affb67c387d
MD5 b02c2015b5546056894bc5ecd81dbc16
BLAKE2b-256 8c96683a9e984c0cd1b2072178b41e4b9e7eca5c6061932e18bcf167c03e07d1

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 eadb15f20a0787dcb084f72b218010b273cfae41e479f03c2408617c61e6408d
MD5 3738fc7a3fb96ec377715c6599a84e66
BLAKE2b-256 53bdfebdeb24a17cdd7bef052889c2e15bffacff524b53888ef2a62f9577f8cc

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 849fdc2e513fb59deb4b48a0b65c6b4a9b73f474ee943f70dacc06526c05dd39
MD5 d7370230af0d9f1dbdab072e67fa6461
BLAKE2b-256 e93f5763f541eb47c6d6d8f9aa09d56e17328ed3506205a4991be572f10096b5

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d731da5d839430869ab20eafb09e19386fd75a3ae1f39109d4edc928c711997d
MD5 0cfc677d1faaa18e2cb385a6e688def0
BLAKE2b-256 49fea81b06bcb42d85841c06ae957449472145f59ec9793721b77ce1200480bc

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 fcbb75a339caa027959da31c1dc12bfd1bbcb743c375af5619d6b655f745024d
MD5 4d120e850ee65087b63d14ebede4cada
BLAKE2b-256 e89d6e74c0b926178d4925ad0724a7fb4cb8d401271ad75b2394660a15bb3efb

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 3066711df142796b3ed6a98bdf391fa7fd1b55b5b861dbb7493afee4cb96d66b
MD5 7c2394603a7392302ad357b44b12840a
BLAKE2b-256 5ff0d0409d7a1b294a8e94b17c0658c29f417b41741f585423baf2f952629752

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 767d923a52bbbf777b6e078cb59d72a2050fdce57f8828399eb173e78ac6ba1c
MD5 37484b66d9978702b92e8f1dc2f019e3
BLAKE2b-256 861d48b0735aa1a346ead3563af1e9e2cb287dea561b06c9b3dd9604a1c22eaa

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4eb85c6cfcb06b36ee0cc201d10c649a9a889c69894cf45f2039d13d41234546
MD5 cc3683333f3738c702b51beed3b33b95
BLAKE2b-256 d5a49d956c10582cb005bdef8275bfc2864b861f4f3a193ea778a6bc92ea92ca

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 d39529e3fa532ded5f0cadc7ab821fb9c14bc6776aa662b42cb2e9eda553c074
MD5 b079a82c2fe23c74a7975f69bd6fcae8
BLAKE2b-256 aa73f0eb11a43ff56794aab12d65e174d7a5b972b1e8eb797103c4c4d4669b3b

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 16546b1f794bcfb562853fe2d577397d4dc4007043b2c23ed9a90b870ade73a2
MD5 65427830931b7e9a9fb39b0769ee549e
BLAKE2b-256 24078829925aa6adedc27fa2c167e773153d5b6001dc1eaeb506618e58f16018

See more details on using hashes here.

File details

Details for the file httparse-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for httparse-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 d6ace1db2672785d5748fb2498d2b96d53a46a645bf04ff6b1820982b3a6c3ef
MD5 5dd2859eb2705118bd2c677726a9c843
BLAKE2b-256 534bbcc51b3b0f385039a47c371af6ebda2a703fb3eebe03043d0f1e8442a16e

See more details on using hashes here.

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