readmes/README.scn.md (#1946)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Create README_chinese.md * Update README_chinese.md * Update README_chinese.md * Update README_chinese.md * Update README_chinese.md
authored by Kevin Anderson · committed by GitHub · parent 716749e · Browse files · 1 file·+146 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+146 added−0 removed
- other:+146 added−0 removed
Provenance
- Commit
e232226- Tree
a3e24fa- Author
Kevin Anderson <77035713+2601677867@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
716749e
1 file changed+146 added−0 removed
added:README_chinese.md+146 added
1+<p align="center">2+ <a href="https://www.python-httpx.org/"><img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/butterfly.png" alt='HTTPX'></a>3+</p>4+5+<p align="center"><strong>HTTPX</strong> <em>- 适用于Python的次世代HTTP客户端 </em></p>6+7+<p align="center">8+<a href="https://github.com/encode/httpx/actions">9+ <img src="https://github.com/encode/httpx/workflows/Test%20Suite/badge.svg" alt="Test Suite">10+</a>11+<a href="https://pypi.org/project/httpx/">12+ <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">13+</a>14+</p>15+16+HTTPX是一个功能齐全的HTTP客户端python3库. 它集成了 **一个命令行客户端**, 支持 **HTTP/1.1 和 HTTP/2**, 而且提供了 **同步和异步API**.17+18+**注意!**: *0.21版本包括对集成命令行的一些改进。最新版本与重新设计的 `http核心`. 都应该自动更新到所需的版本,如果您遇到任何问题,那么您应该确保您安装的版本为 `httpx0.21.*` 且 `httpcore0.14.*` . 请参考 [the CHANGELOG](https://github.com/encode/httpx/blob/master/CHANGELOG.md) 来获得更多细节.*19+20+---21+22+通过pip安装httpx:23+24+```shell25+$ pip install httpx26+```27+28+使用httpx:29+30+```pycon31+>>> import httpx32+>>> r = httpx.get('https://www.example.org/')33+>>> r34+<Response [200 OK]>35+>>> r.status_code36+20037+>>> r.headers['content-type']38+'text/html; charset=UTF-8'39+>>> r.text40+'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'41+```42+43+或者使用命令行客户端.44+45+```shell46+$ pip install 'httpx[cli]' # 只安装集成的命令行功能47+```48+49+它现在允许我们直接从命令行使用HTTPX50+51+<p align="center">52+ <img width="700" src="docs/img/httpx-help.png" alt='httpx --help'>53+</p>54+55+发送一个请求...56+57+<p align="center">58+ <img width="700" src="docs/img/httpx-request.png" alt='httpx http://httpbin.org/json'>59+</p>60+61+## 特性62+63+HTTPX将并为您提供以下功能:64+65+* 广泛的 [requests-compatible API](https://www.python-httpx.org/compatibility/).66+* 内置的命令行客户端功能.67+* HTTP/1.1 [和 HTTP/2 支持](https://www.python-httpx.org/http2/).68+* 标准同步接口,也支持 [异步](https://www.python-httpx.org/async/).69+* 能够直接向 [WSGI 应用发送请求](https://www.python-httpx.org/advanced/#calling-into-python-web-apps) 或向 [ASGI 应用发送请求](https://www.python-httpx.org/async/#calling-into-python-web-apps).70+* 在任何地方设置详细的timeout.71+* 全类型注释.72+* 全部代码均通过测试.73+74+加上这些应该具备的标准功能75+76+* 域名与URL77+* 保持活动状态78+* 具有Cookie持久性的会话79+* 浏览器风格的SSL验证80+* 身份验证81+* Elegant Key/Value Cookies82+* 自动解压缩83+* 内容自动解码84+* Unicode Response Bodies85+* 分段文件上传86+* 支持HTTP(S) 代理87+* 支持设定timeout88+* 流式下载89+* 支持 .netrc 90+* 接收Chunked编码91+92+## 安装93+94+使用pip安装:95+96+```shell97+$ pip install httpx98+```99+100+安装HTTP/2支持:101+102+```shell103+$ pip install httpx[http2]104+```105+106+HTTPX 要求 Python 3.6版本或更高.107+108+## 文档109+110+项目文档现已就绪,请访问 [https://www.python-httpx.org/](https://www.python-httpx.org/) 来阅读!111+112+想学习基础知识?请访问 [快速开始](https://www.python-httpx.org/quickstart/).113+114+想获得进阶帮助? 请访问 [Advanced Usage](https://www.python-httpx.org/advanced/) 来获得答案, 不妨来看看 [异步支持](https://www.python-httpx.org/async/) 或者 [HTTP/2](https://www.python-httpx.org/http2/) 115+116+[Developer Interface](https://www.python-httpx.org/api/) 提供了全面的API参考。117+118+要了解与HTTPX集成的工具, 请访问 [第三方包](https://www.python-httpx.org/third_party_packages/).119+120+## 贡献121+122+如果您想对本项目做出贡献,请访问 [贡献者指南](https://www.python-httpx.org/contributing/) 来了解注意事项123+124+## 依赖125+126+HTTPX项目依赖于这些优秀的库:127+128+* `httpcore` - The underlying transport implementation for `httpx`.129+ * `h11` - HTTP/1.1 support.130+ * `h2` - HTTP/2 support. *(Optional, with `httpx[http2]`)*131+* `certifi` - SSL certificates.132+* `charset_normalizer` - Charset auto-detection.133+* `rfc3986` - URL parsing & normalization.134+ * `idna` - Internationalized domain name support.135+* `sniffio` - Async library autodetection.136+* `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*137+* `click` - Command line client support. *(Optional, with `httpx[cli]`)*138+* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*139+* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*140+141+A huge amount of credit is due to `requests` for the API layout that142+much of this work follows, as well as to `urllib3` for plenty of design143+inspiration around the lower-level networking details.144+145+<p align="center">— ⭐️ —</p>146+<p align="center"><i>HTTPX 代码使用 <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD 开源协议</a>. 在英国布莱顿设计和构建。</i></p>