Skip to main content

HTTP Parse

A lightweight Python library for parsing raw HTTP requests.

Installation

pip install http-parse

Usage

from http_parse import parse

raw_request = """
GET /path HTTP/1.1
Host: example.com
User-Agent: curl/8.5.0

{"data": "example"}
"""

parsed = parse(raw_request)
print(parsed.headers)  # Access headers (dictionary format)
print(parsed.body)     # Access body 
print(parsed.path)      # Access requested path (/foo/bar)

Features

  • Parse HTTP headers into a dictionary
  • Access request body
  • Access and modify headers
  • Extract URL and HTTP method

License

MIT License

Metadata

Release files for http-parse 0.1.5

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

Source distribution (sdist)

Source distribution for http-parse 0.1.5
File Size Uploaded Provenance Actions
http_parse-0.1.5.tar.gz 3.4 kB Without provenance Details for http_parse-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for http-parse 0.1.5
File Interpreter ABI Platform Actions
http_parse-0.1.5-py3-none-any.whl Python 3 none any Details for http_parse-0.1.5-py3-none-any.whl

Total release size: 5.8 kB

Release files / http_parse-0.1.5.tar.gz

Download URL http_parse-0.1.5.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
80011a31eac334439684529d791c42d8f9df71f713ade056e55d4d5df106492a
BLAKE2b-256 checksum
How to use checksums
6cd11762936084e22fba1ca6407a1554db73a3fff04bcc83acf20b9a540c2c61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / http_parse-0.1.5-py3-none-any.whl

Download URL http_parse-0.1.5-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1768980a143a59e7d814d45629a1de707c0652f6e7ac26ae38fa612c938c115f
BLAKE2b-256 checksum
How to use checksums
6e7bfa0f4a4c02fa0bb9f1e4743a3357bb770e7b1b1f90c28d2428928d84c85a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for http-parse 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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