{"id":48726132,"url":"https://github.com/dholth/httpx-pycurl","last_synced_at":"2026-05-07T00:02:47.321Z","repository":{"id":348373679,"uuid":"1197740272","full_name":"dholth/httpx-pycurl","owner":"dholth","description":"Rough draft pycurl transport for httpx as a proof of concept.","archived":false,"fork":false,"pushed_at":"2026-05-03T00:20:02.000Z","size":81,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-03T02:32:15.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/dholth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-31T20:59:28.000Z","updated_at":"2026-05-03T00:19:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dholth/httpx-pycurl","commit_stats":null,"previous_names":["dholth/pycurltx","dholth/httpx-pycurl"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dholth/httpx-pycurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholth%2Fhttpx-pycurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholth%2Fhttpx-pycurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholth%2Fhttpx-pycurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholth%2Fhttpx-pycurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dholth","download_url":"https://codeload.github.com/dholth/httpx-pycurl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholth%2Fhttpx-pycurl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32716960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T19:35:05.142Z","status":"ssl_error","status_checked_at":"2026-05-06T19:35:03.996Z","response_time":117,"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":[],"created_at":"2026-04-11T22:52:51.480Z","updated_at":"2026-05-07T00:02:47.237Z","avatar_url":"https://github.com/dholth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httpx-pycurl\n\n`httpx-pycurl` provides an `httpx` transport that executes requests with\n`pycurl`.  It combines the [goodness of curl](https://everything.curl.dev/) with\nthe familiar `httpx` API, including support for `http/2` and even non-http\nprotocols built into `curl`. `AsyncPyCurlTransport` performs better than\n`httpx`'s default `AsyncHttpTransport` with `http2=True`, taking about 78% of\nthe time to issue 128 requests in parallel. Under heavier usage `httpx-pycurl`\nappears to pull further ahead of alternative libraries, without replacing all of\n`httpx`; just `httpx`'s transport.\n\n## Usage\n\n`AsyncPyCurlTransport` is the focus of this package. It uses the curl\n[`multi_socket`](https://everything.curl.dev/transfers/drive/multi-socket.html)\ninterface to integrate `curl` with the `asyncio` event loop.\n\n```python\nimport httpx\nfrom httpx_pycurl import AsyncPyCurlTransport\n\ntransport = AsyncPyCurlTransport(timeout=10.0)\n\nasync with httpx.AsyncClient(transport=transport) as client:\n    responses = await asyncio.gather(*(client.get(url) for url in urls))\n```\n\n`AsyncPyCurlTransport` delegates SSL/TLS handling to `curl` and does not use\nPython's builtin `ssl` module. By default it calls\n[`certifi.where()`](https://github.com/certifi/python-certifi) to set root\ncertificates. It is also possible to pass a custom path to the root certificates\nwith `AsyncPyCurlTransport(cainfo=ca_cert_path)`.\n\n`PyCurlTransport` is not the focus of this project and is less likely to work.\nIn the future it may delegate to `AsyncPyCurlTransport`.\n\n```python\nimport httpx\nfrom httpx_pycurl import PyCurlTransport\n\ntransport = PyCurlTransport(timeout=10.0)\n\nwith httpx.Client(transport=transport) as client:\n    response = client.get(\"https://example.com\")\n    print(response.status_code)\n    print(response.text)\n\ndebug_transport = PyCurlTransport(\n    verbose=True,\n    debug_callback=lambda info_type, data: print(info_type, data),\n)\n```\n\n## Installation\n\n```bash\npip install httpx-pycurl\n```\n\nOr with conda,\n\n```bash\nconda install -n base conda-pypi\nconda pypi install httpx-pycurl\n```\n\n## Performance\n\n`httpx-pycurl` is in early development but it passes most `httpx` tests and has\ngood performance. Our `tests/bench.py` uses `asyncio.gather()` to make many\n`http/2` requests to `https://httpbingo.org/get` using `httpx`, `niquests`, and\n`httpx` with `httpx-pycurl`'s transport. `httpx-pycurl` is the fastest library\ntested.\n\nRunning `tests/bench.py [N]` shows that the more efficient `http/2` libraries\nshine when performing large numbers of parallel requests, and are closer\ntogether when only groups of 128 parallel requests are made.\n\n```\n2 groups of 512 requests each...\n\nTime per group:\nhttpx: 0.679s ± 0.119s\nniquests: 0.432s ± 0.140s\nhttpx_pycurl: 0.299s ± 0.056s\n\nPaired t-test: httpx_pycurl vs niquests\nt-stat: -2.249 (approx p \u003c 0.05 if |t| \u003e 2.365)\nSpeedup: 1.44x\n```\n\n```\n4 groups of 256 requests each...\n\nTime per group:\nhttpx: 0.378s ± 0.077s\nniquests: 0.259s ± 0.064s\nhttpx_pycurl: 0.190s ± 0.034s\n\nPaired t-test: httpx_pycurl vs niquests\nt-stat: -4.208 (approx p \u003c 0.05 if |t| \u003e 2.365)\nSpeedup: 1.36x\n```\n\n```\n8 groups of 128 requests each...\n\nTime per group:\nhttpx: 0.215s ± 0.073s\nniquests: 0.205s ± 0.038s\nhttpx_pycurl: 0.162s ± 0.033s\n\nPaired t-test: httpx_pycurl vs niquests\nt-stat: -8.949 (approx p \u003c 0.05 if |t| \u003e 2.365)\nSpeedup: 1.27x\n```\n\n## Dependencies\n\n`httpx-pycurl` uses curl to support `http/2` instead of the `h2`, `hpack` and\n`hyperframe` dependencies used by `httpx`.\n\n```\n$ pip install --dry-run httpx-pycurl\n...\nWould install anyio-4.13.0 certifi-2026.4.22 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 httpx-pycurl-0.0.4 idna-3.13 pycurl-7.45.7\n\n$ pip install --dry-run httpx[http2]\n...\nWould install anyio-4.13.0 certifi-2026.4.22 h11-0.16.0 h2-4.3.0 hpack-4.1.0 httpcore-1.0.9 httpx-0.28.1 hyperframe-6.1.0 idna-3.13\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdholth%2Fhttpx-pycurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdholth%2Fhttpx-pycurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdholth%2Fhttpx-pycurl/lists"}