YTTP - Custom HTTP Parser
Project Objective
This project implements a custom HTTP parser that supports messages with or without request lines, unlike h11 which requires request lines.
Key Features
- Flexible Message Parsing: Supports both standard HTTP requests and header-only messages (like LSP/MCP protocols)
- Event-driven Architecture: Compatible with h11's interface using Request, Headers, Data, and EndOfMessage events
- Content-Length Body Parsing: Handles fixed-length message bodies
- Chunked Transfer Encoding: Supports chunked message parsing with hex size indicators
- Error Handling: Uses Result[T] pattern for consistent error handling without exceptions
Technical Implementation
The parser uses a state machine approach:
WANT_REQUEST_OR_HEADERS: Determines if first line is HTTP request or headerWANT_HEADERS: Parses header sectionWANT_BODY: Parses message body based on Content-Length or Transfer-EncodingCOMPLETE: Message fully parsed
Use Case
Enables parsing of protocols that send header-only messages without HTTP request lines, which h11 cannot handle due to its strict HTTP compliance requirements.
Metadata
Release files for yttp 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yttp-0.0.2.tar.gz | 6.7 kB | Without provenance | Details for yttp-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yttp-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for yttp-0.0.2-py3-none-any.whl |
Total release size: 14.4 kB
Release files / yttp-0.0.2.tar.gz
| Download URL | yttp-0.0.2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ee9e02fe248ab137d06b0828335357aa19484e46d3b163fc81680abe2de9c2
|
|
BLAKE2b-256 checksum How to use checksums |
64ac660995a0942a496ca86b70b28ddba12e744d3f04f9126c3d977367579456
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / yttp-0.0.2-py3-none-any.whl
| Download URL | yttp-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e135c5c3e62a9649a9a19d609fb9ef5c5d2af200313103d064fb73edc1860a0
|
|
BLAKE2b-256 checksum How to use checksums |
240a1eac4f499f4703221042070964bda91c7695016b5f6e16ae19b9b298f02f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for yttp 0.0.2
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.