

Python Requests III
source link: https://www.tuicool.com/articles/hit/6zIvaqa
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Requests III: HTTP for Humans and Machines, alike.
If you're interested in financially supporting Requests 3 development, please make a donation .
Requests IIIis an HTTP library for Python, built for Humans and Machines, alike. This repository is a work in progress, and the expected release timeline is "before PyCon 2020" .
Behold, the power of Requests III:
>>> from requests import HTTPSession # Make a connection pool. >>> http = HTTPSession() # Make a request. >>> r = http.request('get', 'https://httpbin.org/ip') # View response data. >>> r.json() {'ip': '172.69.48.124'}
Requests III allows you to send organic, grass-fed HTTP/1.1 & HTTP/2 (wip) requests, without the need for manual thought-labor. There's no need to add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, as well.
Besides, all the cool kids are doing it. Requests is one of the most downloaded Python packages of all time, pulling in over ~1.6 million installations per day !
Feature Support
Requests III is ready for today's web.
- Support for H11 & H2 protocols.
- Type-annotations for all public-facing APIs.
- Better defaults; required timeouts.
-
async
/await
keyword &asyncio
support. - Compability with Python 3.6+.
While retaining all the features of Requests Classic :
.netrc
Installation
To install Requests III, simply use pipenv (or pip, of course):
$ pipenv install requests3 :sparkles::cake::sparkles:
Satisfaction guaranteed.
Documentation
Fantastic documentation is available at http://3.python-requests.org/ , for a limited time only.
How to Contribute
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS .
Recommend
-
34
Prelude This is the third post in a three part series that will provide an understanding of the mechanics and semantics behind the scheduler in Go. This post focuses on concurrency. Index of the three...
-
28
题目描述 给定一个二叉树,它的每个结点都存放着一个整数值。 找出路径和等于给定数值的路径总数。 路径不需要从根节点开始,也不需要在叶子节点结束,但是路径方向必须是向下的(只能从父节点到子节点)。...
-
39
这一篇也是基于"打家劫舍"的扩展,需要针对特殊情况特殊考虑,当然其本质还是动态规划,优化时需要考虑数据结构。 原题 在上次打劫完一条街道之后和一圈房屋后,小偷又发现了一个新的可行窃的地区。这个地区只有一个...
-
51
写在前面 这一期魔改Transformers主要关注对原始模型中位置信息的讨论与优化, 「Self-Attention with RPR from Google,NAACL2018」 ...
-
16
Anatomy of a Linux DNS Lookup – Part III zwischenzugs Uncategorized...
-
7
Introduction This article continues on from the previous two
-
9
A hodgepodge of things I haven’t mentioned yet and thinking about what’s nextPermalink While this p...
-
11
Python and Go : Part III - Packaging Python CodeMiki TebekaAugust 11, 2020Series IndexPython and Go: Part I - gRPC
-
7
Raspberry Pi Server Mark III – Uptime LabRaspberry Pi...
-
10
Lupin III: The First is the perfect holiday adventure The hero of Miyazaki’s Castle of Cagliostro is here to close out 2020 with Nazi-fighting joy...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK