{ "info": { "author": "Tom Christie", "author_email": "tom@tomchristie.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Internet :: WWW/HTTP" ], "description": "# HTTPCore\n\n\n \"Build\n\n\n \"Coverage\"\n\n\n \"Package\n\n\n## Feature support\n\n* `HTTP/2` and `HTTP/1.1` support.\n* `async`/`await` support for non-blocking HTTP requests.\n* Strict timeouts everywhere by default.\n* Fully type annotated.\n* 100% test coverage.\n\nPlus all the standard features of requests...\n\n* International Domains and URLs\n* Keep-Alive & Connection Pooling\n* Sessions with Cookie Persistence\n* Browser-style SSL Verification\n* Basic/Digest Authentication *TODO - We have Basic, but not Digest yet.*\n* Elegant Key/Value Cookies\n* Automatic Decompression\n* Automatic Content Decoding\n* Unicode Response Bodies\n* Multipart File Uploads *TODO - Request content currently supports URL encoded data, JSON, bytes, or async byte iterators.*\n* HTTP(S) Proxy Support *TODO*\n* Connection Timeouts\n* Streaming Downloads\n* .netrc Support *TODO*\n* Chunked Requests\n\n## Usage\n\nMaking a request:\n\n```python\n>>> import httpcore\n>>> client = httpcore.Client()\n>>> response = client.get('https://example.com')\n>>> response.status_code\n\n>>> response.protocol\n'HTTP/2'\n>>> response.text\n'\\n\\n\\nExample Domain\\n...'\n```\n\nAlternatively, async requests:\n\n**Note**: Use `ipython` to try this from the console, since it supports `await`.\n\n```python\n>>> import httpcore\n>>> client = httpcore.AsyncClient()\n>>> response = await client.get('https://example.com')\n>>> response.status_code\n\n>>> response.protocol\n'HTTP/2'\n>>> response.text\n'\\n\\n\\nExample Domain\\n...'\n```\n\n---\n\n## Dependencies\n\n* `h2` - HTTP/2 support.\n* `h11` - HTTP/1.1 support.\n* `certifi` - SSL certificates.\n* `chardet` - Fallback auto-detection for response encoding.\n* `idna` - Internationalized domain name support.\n* `rfc3986` - URL parsing & normalization.\n* `brotlipy` - Decoding for \"brotli\" compressed responses. *(Optional)*\n\nA huge amount of credit is due to `requests` for the API layout that\nmuch of this work follows, as well as to `urllib3` for plenty of design\ninspiration around the lower level networking details.\n\n---\n\n## API Reference\n\n### `Client`\n\n*An HTTP client, with connection pooling, redirects, cookie persistence, etc.*\n\n```python\n>>> client = Client()\n>>> response = client.get('https://example.org')\n```\n\n* `def __init__([auth], [cookies], [verify], [cert], [timeout], [pool_limits], [max_redirects], [dispatch])`\n* `def .request(method, url, [data], [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .get(url, [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .options(url, [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .head(url, [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .post(url, [data], [json], [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .put(url, [data], [json], [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .patch(url, [data], [json], [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .delete(url, [data], [json], [params], [headers], [cookies], [auth], [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .send(request, [stream], [allow_redirects], [verify], [cert], [timeout])`\n* `def .close()`\n\n### `Response`\n\n*An HTTP response.*\n\n* `def __init__(...)`\n* `.status_code` - **int** *(Typically a `StatusCode` IntEnum.)*\n* `.reason_phrase` - **str**\n* `.protocol` - `\"HTTP/2\"` or `\"HTTP/1.1\"`\n* `.url` - **URL**\n* `.headers` - **Headers**\n* `.content` - **bytes**\n* `.text` - **str**\n* `.encoding` - **str**\n* `.is_redirect` - **bool**\n* `.request` - **Request**\n* `.cookies` - **Cookies**\n* `.history` - **List[Response]**\n* `def .raise_for_status()` - **None**\n* `def .json()` - **Any**\n* `def .read()` - **bytes**\n* `def .stream()` - **bytes iterator**\n* `def .raw()` - **bytes iterator**\n* `def .close()` - **None**\n* `def .next()` - **Response**\n\n### `Request`\n\n*An HTTP request. Can be constructed explicitly for more control over exactly\nwhat gets sent over the wire.*\n\n```python\n>>> request = Request(\"GET\", \"https://example.org\", headers={'host': 'example.org'})\n>>> response = client.send(request)\n```\n\n* `def __init__(method, url, [params], [data], [json], [headers], [cookies])`\n* `.method` - **str**\n* `.url` - **URL**\n* `.content` - **byte** or **byte async iterator**\n* `.headers` - **Headers**\n* `.cookies` - **Cookies**\n\n### `URL`\n\n*A normalized, IDNA supporting URL.*\n\n```python\n>>> url = URL(\"https://example.org/\")\n>>> url.host\n'example.org'\n```\n\n* `def __init__(url, allow_relative=False, params=None)`\n* `.scheme` - **str**\n* `.authority` - **str**\n* `.host` - **str**\n* `.port` - **int**\n* `.path` - **str**\n* `.query` - **str**\n* `.full_path` - **str**\n* `.fragment` - **str**\n* `.is_ssl` - **bool**\n* `.origin` - **Origin**\n* `.is_absolute_url` - **bool**\n* `.is_relative_url` - **bool**\n* `def .copy_with([scheme], [authority], [path], [query], [fragment])` - **URL**\n* `def .resolve_with(url)` - **URL**\n\n### `Origin`\n\n*A normalized, IDNA supporting set of scheme/host/port info.*\n\n```python\n>>> Origin('https://example.org') == Origin('HTTPS://EXAMPLE.ORG:443')\nTrue\n```\n\n* `def __init__(url)`\n* `.is_ssl` - **bool**\n* `.host` - **str**\n* `.port` - **int**\n\n### `Headers`\n\n*A case-insensitive multi-dict.*\n\n```python\n>>> headers = Headers({'Content-Type': 'application/json'})\n>>> headers['content-type']\n'application/json'\n```\n\n* `def __init__(self, headers)`\n\n### `Cookies`\n\n*A dict-like cookie store.*\n\n```python\n>>> cookies = Cookies()\n>>> cookies.set(\"name\", \"value\", domain=\"example.org\")\n```\n\n* `def __init__(cookies: [dict, Cookies, CookieJar])`\n* `.jar` - **CookieJar**\n* `def extract_cookies(response)`\n* `def set_cookie_header(request)`\n* `def set(name, value, [domain], [path])`\n* `def get(name, [domain], [path])`\n* `def delete(name, [domain], [path])`\n* `def clear([domain], [path])`\n* *Standard mutable mapping interface*\n\n___\n\n## Alternate backends\n\n### `AsyncClient`\n\nAn asyncio client.\n\n### `TrioClient`\n\n*TODO*\n\n---\n\n## The Stack\n\nThere are two main layers in the stack. The client handles redirection,\ncookie persistence (TODO), and authentication (TODO). The dispatcher\nhandles sending the actual request and getting the response.\n\n* `Client` - Redirect, authentication, cookies etc.\n* `ConnectionPool(Dispatcher)` - Connection pooling & keep alive.\n * `HTTPConnection` - A single connection.\n * `HTTP11Connection` - A single HTTP/1.1 connection.\n * `HTTP2Connection` - A single HTTP/2 connection, with multiple streams.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/encode/httpcore", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "httpcore", "package_url": "https://pypi.org/project/httpcore/", "platform": "", "project_url": "https://pypi.org/project/httpcore/", "project_urls": { "Homepage": "https://github.com/encode/httpcore" }, "release_url": "https://pypi.org/project/httpcore/0.4.0/", "requires_dist": null, "requires_python": ">=3.6", "summary": "...", "version": "0.4.0" }, "last_serial": 5367459, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5ee18c80cf4ef1d5837b7f1db936d803", "sha256": "1a750cf2fb0de93ecd49a3a72e5b21744ec5feffda1499a32ae492d19a865be5" }, "downloads": -1, "filename": "httpcore-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5ee18c80cf4ef1d5837b7f1db936d803", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6217, "upload_time": "2019-04-04T17:44:38", "url": "https://files.pythonhosted.org/packages/00/d2/6e58cc2355f191263d81aa024fcfc862539589ebe580555a22bea31fb32c/httpcore-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7d9ca32c34d74f710ec2a313d32526ae", "sha256": "d5568f538d65703d15f9c41aca4941b156aef5fc514a3b445aa2e846cffa9002" }, "downloads": -1, "filename": "httpcore-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7d9ca32c34d74f710ec2a313d32526ae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4169, "upload_time": "2019-04-04T17:46:30", "url": "https://files.pythonhosted.org/packages/e0/c3/0bcbf3e2f6d172536928322a32b53f9e883955408ff30eccd659fd128867/httpcore-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7c08fd74c6bdd740f96a0cb67a196c35", "sha256": "a48728236a581aa50edbeed57cfd85b2841966494ba37fa42427abfd1693de90" }, "downloads": -1, "filename": "httpcore-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7c08fd74c6bdd740f96a0cb67a196c35", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7148, "upload_time": "2019-04-06T12:38:57", "url": "https://files.pythonhosted.org/packages/28/c1/ee8ef096fb8b775b5f2a4d2c76d43fd5ad53d0e77c327862f0e483f62b93/httpcore-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "8016b08e9956f0546a0cdeeb12e41e34", "sha256": "f88d35d597baaed5f9022f01fff6ce42e1cfe7c9c2e5238d020b813ad532e389" }, "downloads": -1, "filename": "httpcore-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8016b08e9956f0546a0cdeeb12e41e34", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12010, "upload_time": "2019-04-18T10:54:02", "url": "https://files.pythonhosted.org/packages/fb/6d/29ce2c59b44689d0020f40c5f36f29c03a9067e708ec2031ca6529ab1d6e/httpcore-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d9070cd91ca39b3cac1be753e1dd12dd", "sha256": "4b8f662715a1aac588326e427efdb885027e228c1389f14b4aa6ac635766ac80" }, "downloads": -1, "filename": "httpcore-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d9070cd91ca39b3cac1be753e1dd12dd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12039, "upload_time": "2019-04-19T19:37:51", "url": "https://files.pythonhosted.org/packages/34/0d/e787c31acf046a21c2cfa01fc9888fbeba483ef3a1ec83948c4460f5eff7/httpcore-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a06447c35fa92badd5215ee719f8687d", "sha256": "ae8bd51bdef854a166119e08f273ca22a8fe0d3e4dd049b6a516070626b68f62" }, "downloads": -1, "filename": "httpcore-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a06447c35fa92badd5215ee719f8687d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 13013, "upload_time": "2019-04-23T10:54:46", "url": "https://files.pythonhosted.org/packages/99/df/167f373397dcf2007453dc015c072f3b067e3e6a908b03bf69ebeb980d3c/httpcore-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4bac5a11a8df0d603fad40ae8078bc25", "sha256": "e3d5d110f49012dd3f1980ba5779f91170457cde43851e531e56e6eb08f05357" }, "downloads": -1, "filename": "httpcore-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4bac5a11a8df0d603fad40ae8078bc25", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12644, "upload_time": "2019-04-24T10:53:18", "url": "https://files.pythonhosted.org/packages/0a/77/fad1ad195add3d50b8e67ee7e7eab2f80ba5cc9ae50347781472bb96c835/httpcore-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f9c68a3fbd3911f4c77adca448ef5f7d", "sha256": "96f910b528d47b683242ec207050c7bbaa99cd1b9a07f78ea80cf61e55556b58" }, "downloads": -1, "filename": "httpcore-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f9c68a3fbd3911f4c77adca448ef5f7d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 24847, "upload_time": "2019-05-16T11:43:03", "url": "https://files.pythonhosted.org/packages/fd/6a/4447154dbbe7cac4cd390765caebe4b28febd53d86420e2ced334b3d4d23/httpcore-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "d737d955173442b68f5e6dc00512455e", "sha256": "64a6bb0ed24d8535191d392d06dcd5071d363ce2c2b8f5db1062b503ba95f3b5" }, "downloads": -1, "filename": "httpcore-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d737d955173442b68f5e6dc00512455e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 29266, "upload_time": "2019-06-06T14:24:12", "url": "https://files.pythonhosted.org/packages/43/96/909386e664eb5571e8091c86589f96aee8fcb77aa33ca07c9f49e0d41115/httpcore-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d737d955173442b68f5e6dc00512455e", "sha256": "64a6bb0ed24d8535191d392d06dcd5071d363ce2c2b8f5db1062b503ba95f3b5" }, "downloads": -1, "filename": "httpcore-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d737d955173442b68f5e6dc00512455e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 29266, "upload_time": "2019-06-06T14:24:12", "url": "https://files.pythonhosted.org/packages/43/96/909386e664eb5571e8091c86589f96aee8fcb77aa33ca07c9f49e0d41115/httpcore-0.4.0.tar.gz" } ] }