{"id":34979254,"url":"https://github.com/markussintonen/pyreqwest","last_synced_at":"2026-03-07T22:09:06.336Z","repository":{"id":318541060,"uuid":"1016651482","full_name":"MarkusSintonen/pyreqwest","owner":"MarkusSintonen","description":"Fast Python HTTP client based on Rust reqwest","archived":false,"fork":false,"pushed_at":"2026-02-13T20:56:54.000Z","size":28117,"stargazers_count":287,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-14T03:28:54.787Z","etag":null,"topics":["http","http-client","http2","python","reqwest","rust"],"latest_commit_sha":null,"homepage":"https://markussintonen.github.io/pyreqwest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkusSintonen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-09T10:20:47.000Z","updated_at":"2026-02-13T20:52:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"75238511-01c0-4592-b6a1-d5423cc6a8c9","html_url":"https://github.com/MarkusSintonen/pyreqwest","commit_stats":null,"previous_names":["markussintonen/pyreqwest"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/MarkusSintonen/pyreqwest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusSintonen%2Fpyreqwest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusSintonen%2Fpyreqwest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusSintonen%2Fpyreqwest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusSintonen%2Fpyreqwest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkusSintonen","download_url":"https://codeload.github.com/MarkusSintonen/pyreqwest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusSintonen%2Fpyreqwest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29447768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["http","http-client","http2","python","reqwest","rust"],"created_at":"2025-12-27T00:51:55.474Z","updated_at":"2026-02-14T15:05:10.937Z","avatar_url":"https://github.com/MarkusSintonen.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"250\" alt=\"logo\" src=\"https://raw.githubusercontent.com/MarkusSintonen/pyreqwest/refs/heads/main/docs/logo.png\" /\u003e\n\u003c/p\u003e\n\n---\n[![codecov](https://codecov.io/github/markussintonen/pyreqwest/graph/badge.svg?token=OET0CMZYOH)](https://codecov.io/github/markussintonen/pyreqwest)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyreqwest)\n\npyreqwest - Powerful and fast Rust based HTTP client. Built on top of and inspired by [reqwest](https://github.com/seanmonstar/reqwest).\n\n## Why\n\n- No reinvention of the wheel - built on top of widely used reqwest and other Rust HTTP crates\n- Secure and fast - no C-extension code, no Python code/dependencies, no `unsafe` code\n- Ergonomic and easy to use - similar API as in reqwest, fully type-annotated\n- Testing ergonomics - mocking included, can also connect into ASGI apps\n\nUsing this is a good choice when:\n\n- You care about throughput and latency, especially in high concurrency scenarios\n- You want a single solution to serve all your HTTP client needs\n\nThis is not a good choice when:\n\n- You want a pure Python solution allowing debugging of the HTTP client internals\n- You use alternative Python implementations or Python version older than 3.11\n\n## Features\n\n- High performance, see [notes](https://github.com/MarkusSintonen/pyreqwest/blob/main/docs/performance.md) and [benchmarks](https://github.com/MarkusSintonen/pyreqwest/blob/main/docs/benchmarks.md)\n- Asynchronous and synchronous HTTP clients\n- Customizable via middlewares and custom JSON serializers\n- Ergonomic as `reqwest`\n- HTTP/1.1 and HTTP/2 support (also HTTP/3 when it [stabilizes](https://docs.rs/reqwest/latest/reqwest/#unstable-features))\n- Mocking and testing utilities (can also connect to ASGI apps)\n- Fully type-safe with Python type hints\n- Full test coverage\n- Free threading, see [notes](https://github.com/MarkusSintonen/pyreqwest/blob/main/docs/performance.md#python-313-free-threading)\n\n### Standard HTTP features you would expect\n\n- HTTPS support (using [rustls](https://github.com/rustls/rustls))\n- Request and response body streaming\n- Connection pooling\n- JSON, URLs, Headers, Cookies etc. (all serializers in Rust)\n- Automatic decompression (zstd, gzip, brotli, deflate)\n- Automatic response decoding (charset detection)\n- Multipart form support\n- Proxy support (also SOCKS)\n- Redirects\n- Timeouts\n- Authentication (Basic, Bearer)\n- Cookie management\n\n## Quickstart\n\n```python\n# uv add pyreqwest\n\nfrom pyreqwest.client import ClientBuilder, SyncClientBuilder\n\nasync def example_async():\n    async with ClientBuilder().error_for_status(True).build() as client:\n        response = await client.get(\"https://httpbun.com/get\").query({\"q\": \"val\"}).build().send()\n        print(await response.json())        \n\ndef example_sync():\n    with SyncClientBuilder().error_for_status(True).build() as client:\n        print(client.get(\"https://httpbun.com/get\").query({\"q\": \"val\"}).build().send().json())\n```\n\nContext manager usage is optional, but recommended. Also `close()` methods are available.\n\n#### Mocking in pytest\n\n```python\nfrom pyreqwest.client import ClientBuilder\nfrom pyreqwest.pytest_plugin import ClientMocker\n\nasync def test_client(client_mocker: ClientMocker) -\u003e None:\n    client_mocker.get(path=\"/api\").with_body_text(\"Hello Mock\")\n\n    async with ClientBuilder().build() as client:\n        response = await client.get(\"http://example.invalid/api\").build().send()\n        assert response.status == 200 and await response.text() == \"Hello Mock\"\n        assert client_mocker.get_call_count() == 1\n```\n\nManual mocking is available via `ClientMocker.create_mocker(MonkeyPatch)`.\n\n#### Simple request interface\n\nThis is only recommended for simple use-cases such as scripts. Usually, the full client API should be used which reuses\nconnections and has other optimizations.\n\n```python\n# Sync example\nfrom pyreqwest.simple.sync_request import pyreqwest_get\nresponse = pyreqwest_get(\"https://httpbun.com/get\").query({\"q\": \"val\"}).send()\nprint(response.json())\n```\n\n```python\n# Async example\nfrom pyreqwest.simple.request import pyreqwest_get\nresponse = await pyreqwest_get(\"https://httpbun.com/get\").query({\"q\": \"val\"}).send()\nprint(await response.json())\n```\n\n## Documentation\n\nSee [docs](https://markussintonen.github.io/pyreqwest/pyreqwest.html)\n\nSee [examples](https://github.com/MarkusSintonen/pyreqwest/tree/main/examples)\n\n## Compatibility with other libraries\n\nSee [compatibility docs](https://markussintonen.github.io/pyreqwest/pyreqwest/compatibility.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkussintonen%2Fpyreqwest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkussintonen%2Fpyreqwest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkussintonen%2Fpyreqwest/lists"}