httpparser is a Python binding for PicoHttpParser
Installation
httpparser requires Python 2.7, 3.4+ and is available on PyPI.
Use pip to install it:
pip install httpparser
Using httpparser
import httpparser
class Protocol:
def __init__(self):
self.parser = httpparser.Request(self)
def on_header(self, name, value):
pass
def on_headers(self, headers):
pass
def on_uri(self, uri):
pass
def on_body(self, body):
pass
def on_complete(self):
pass
def data_received(self, data):
self.parser.parse(data)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httpparser-0.3.8.tar.gz
(48.1 kB
view details)
File details
Details for the file httpparser-0.3.8.tar.gz.
File metadata
- Download URL: httpparser-0.3.8.tar.gz
- Upload date:
- Size: 48.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4fa5bd2ea8538b9b57c45a94702a00883a9192425da64b5d067a73f44fead3
|
|
| MD5 |
12190368effc030b39db6fd5d4beccbf
|
|
| BLAKE2b-256 |
c6da7a9763cf08004fd1b9ab0e2a95d549dcc72013b72687a5bcc7ab20d18667
|