httptools
A Python binding for the Node.js HTTP parser, providing fast and efficient HTTP parsing capabilities. Current version: 0.7.1. Maintained actively with regular updates.
Warnings
- breaking Python 3.8 is no longer supported; Python 3.9 or higher is required.
- gotcha Ensure that the 'protocol' object passed to HttpRequestParser has the required methods implemented.
Install
-
pip install httptools
Imports
- HttpRequestParser
from httptools import HttpRequestParser
Quickstart
from httptools import HttpRequestParser # Initialize the parser with a protocol object parser = HttpRequestParser(protocol) # Feed data to the parser parser.feed(data) # Access parsed data parsed_data = parser.get_parsed_data()