urllib3¶
urllib3 是一個功能強大且易於使用的 Python HTTP 客戶端。許多 Python 生態系統已經在使用 urllib3,您也應該使用它。
urllib3 提供了許多 Python 標準程式庫所缺乏的重要功能:
執行緒安全。
連接池。
客戶端 TLS/SSL 驗證。
File uploads with multipart encoding.
用於重試請求及處理 HTTP 重新導向的輔助工具。
支援 gzip、deflate、brotli 及 zstd 編碼。
支援 HTTP 與 SOCKS 代理。
100% 測試覆蓋率。
urllib3 功能強大且易於使用:
>>> import urllib3
>>> resp = urllib3.request("GET", "https://httpbin.org/robots.txt")
>>> resp.status
200
>>> resp.data
b"User-agent: *\nDisallow: /deny\n"
企業方案¶
urllib3 的專業支援已包含在 Tidelift 訂閱服務中。Tidelift 為軟體開發團隊提供單一的採購與維護管道,由最了解軟體的專家提供專業級保障,並能與現有工具無縫整合。 |
安裝方式¶
urllib3 可以透過 pip 進行安裝
$ python -m pip install urllib3
或者,你也可以從 GitHub 取得最新的來源碼:
$ git clone https://github.com/urllib3/urllib3.git
$ cd urllib3
$ pip install .
使用方式¶
The 使用者指南 is the place to go to learn how to use the library and accomplish common tasks. The more in-depth 進階用法 guide is the place to go for lower-level tweaking.
API 參考文件提供了 API 層級的文件。
誰在使用 urllib3?¶
urllib3 是 PyPI 上下載量最高的軟體包之一,也是許多熱門 Python 軟體包(如 Requests、Pip 等)的依賴項目!
授權條款¶
urllib3 is made available under the MIT License. For more details, see LICENSE.txt.
貢獻指南¶
我們非常歡迎各界的貢獻,詳情請參見貢獻指南。


