{"id":15441309,"url":"https://github.com/adriangb/httparse","last_synced_at":"2025-04-19T12:04:09.278Z","repository":{"id":63175561,"uuid":"562315668","full_name":"adriangb/httparse","owner":"adriangb","description":"Python wrapper for Rust's httparse HTTP parser","archived":false,"fork":false,"pushed_at":"2022-11-14T05:22:06.000Z","size":38,"stargazers_count":40,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-24T16:46:27.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adriangb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-06T00:18:22.000Z","updated_at":"2024-01-05T19:19:44.000Z","dependencies_parsed_at":"2022-11-14T10:48:08.776Z","dependency_job_id":null,"html_url":"https://github.com/adriangb/httparse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangb%2Fhttparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangb%2Fhttparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangb%2Fhttparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangb%2Fhttparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adriangb","download_url":"https://codeload.github.com/adriangb/httparse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156025,"owners_count":20732357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T19:19:58.975Z","updated_at":"2025-03-30T21:31:49.302Z","avatar_url":"https://github.com/adriangb.png","language":"Rust","readme":"# httparse\n\n![CI](https://github.com/adriangb/httparse/actions/workflows/python.yaml/badge.svg)\n\nPython wrapper for Rust's [httparse](https://github.com/seanmonstar/httparse).\nSee this project on [GitHub](https://github.com/adriangb/httparse).\n\n## Example\n\n```python\nfrom httparse import RequestParser\n\nparser = RequestParser()\n\nbuff = b\"GET /index.html HTTP/1.1\\r\\nHost\"\nparsed = parser.parse(buff)\nassert parsed is None\n\n# a partial request, so we try again once we have more data\nbuff = b\"GET /index.html HTTP/1.1\\r\\nHost: example.domain\\r\\n\\r\\n\"\nparsed = parser.parse(buff)\nassert parsed is not None\nassert parsed.method == \"GET\"\nassert parsed.path == \"/index.html\"\nassert parsed.version == 1\nassert parsed.body_start_offset == len(buff)\nheaders = [(h.name.encode(), h.value) for h in parsed.headers]\nassert headers == [(b\"Host\", b\"example.domain\")]\n```\n","funding_links":[],"categories":["Web \u0026 Networking"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriangb%2Fhttparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadriangb%2Fhttparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriangb%2Fhttparse/lists"}