{"id":13573536,"url":"https://github.com/encode/httpcore","last_synced_at":"2025-05-13T18:08:45.611Z","repository":{"id":37003076,"uuid":"237210639","full_name":"encode/httpcore","owner":"encode","description":"A minimal HTTP client. ⚙️","archived":false,"fork":false,"pushed_at":"2025-04-24T22:06:25.000Z","size":1837,"stargazers_count":499,"open_issues_count":44,"forks_count":118,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-03T01:13:01.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.encode.io/httpcore/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/encode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-01-30T12:41:11.000Z","updated_at":"2025-05-01T08:07:00.000Z","dependencies_parsed_at":"2023-09-27T18:46:19.857Z","dependency_job_id":"6b5db611-9abf-4c64-af65-ff605362b96b","html_url":"https://github.com/encode/httpcore","commit_stats":{"total_commits":555,"total_committers":60,"mean_commits":9.25,"dds":0.6468468468468469,"last_synced_commit":"0bfcee4cd266775c4d9ce2f89fc1b6afa8afc356"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encode","download_url":"https://codeload.github.com/encode/httpcore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000850,"owners_count":21997441,"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-08-01T15:00:37.340Z","updated_at":"2025-05-13T18:08:45.586Z","avatar_url":"https://github.com/encode.png","language":"Python","funding_links":[],"categories":["Python","HTTP Clients"],"sub_categories":[],"readme":"# HTTP Core\n\n[![Test Suite](https://github.com/encode/httpcore/workflows/Test%20Suite/badge.svg)](https://github.com/encode/httpcore/actions)\n[![Package version](https://badge.fury.io/py/httpcore.svg)](https://pypi.org/project/httpcore/)\n\n\u003e *Do one thing, and do it well.*\n\nThe HTTP Core package provides a minimal low-level HTTP client, which does\none thing only. Sending HTTP requests.\n\nIt does not provide any high level model abstractions over the API,\ndoes not handle redirects, multipart uploads, building authentication headers,\ntransparent HTTP caching, URL parsing, session cookie handling,\ncontent or charset decoding, handling JSON, environment based configuration\ndefaults, or any of that Jazz.\n\nSome things HTTP Core does do:\n\n* Sending HTTP requests.\n* Thread-safe / task-safe connection pooling.\n* HTTP(S) proxy \u0026 SOCKS proxy support.\n* Supports HTTP/1.1 and HTTP/2.\n* Provides both sync and async interfaces.\n* Async backend support for `asyncio` and `trio`.\n\n## Requirements\n\nPython 3.8+\n\n## Installation\n\nFor HTTP/1.1 only support, install with:\n\n```shell\n$ pip install httpcore\n```\n\nThere are also a number of optional extras available...\n\n```shell\n$ pip install httpcore['asyncio,trio,http2,socks']\n```\n\n## Sending requests\n\nSend an HTTP request:\n\n```python\nimport httpcore\n\nresponse = httpcore.request(\"GET\", \"https://www.example.com/\")\n\nprint(response)\n# \u003cResponse [200]\u003e\nprint(response.status)\n# 200\nprint(response.headers)\n# [(b'Accept-Ranges', b'bytes'), (b'Age', b'557328'), (b'Cache-Control', b'max-age=604800'), ...]\nprint(response.content)\n# b'\u003c!doctype html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\u003ctitle\u003eExample Domain\u003c/title\u003e\\n\\n\u003cmeta charset=\"utf-8\"/\u003e\\n ...'\n```\n\nThe top-level `httpcore.request()` function is provided for convenience. In practice whenever you're working with `httpcore` you'll want to use the connection pooling functionality that it provides.\n\n```python\nimport httpcore\n\nhttp = httpcore.ConnectionPool()\nresponse = http.request(\"GET\", \"https://www.example.com/\")\n```\n\nOnce you're ready to get going, [head over to the documentation](https://www.encode.io/httpcore/).\n\n## Motivation\n\nYou *probably* don't want to be using HTTP Core directly. It might make sense if\nyou're writing something like a proxy service in Python, and you just want\nsomething at the lowest possible level, but more typically you'll want to use\na higher level client library, such as `httpx`.\n\nThe motivation for `httpcore` is:\n\n* To provide a reusable low-level client library, that other packages can then build on top of.\n* To provide a *really clear interface split* between the networking code and client logic,\n  so that each is easier to understand and reason about in isolation.\n\n## Dependencies\n\nThe `httpcore` package has the following dependencies...\n\n* `h11`\n* `certifi`\n\nAnd the following optional extras...\n\n* `anyio` - Required by `pip install httpcore['asyncio']`.\n* `trio` - Required by `pip install httpcore['trio']`.\n* `h2` - Required by `pip install httpcore['http2']`.\n* `socksio` - Required by `pip install httpcore['socks']`.\n\n## Versioning\n\nWe use [SEMVER for our versioning policy](https://semver.org/).\n\nFor changes between package versions please see our [project changelog](CHANGELOG.md).\n\nWe recommend pinning your requirements either the most current major version, or a more specific version range:\n\n```python\npip install 'httpcore==1.*'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencode%2Fhttpcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencode%2Fhttpcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencode%2Fhttpcore/lists"}