Skip to content
Myr

README.md

This file

Path

README.md

116 lines · 5.1 KiB · Markdown

Last changed by

Update README.mdKenneth Reitzbefore adoption0f71067

History of this file

Take it

Update README.mdKenneth Reitzbefore adoption6b89c87

lines 1–2why, one step back
1
2

Update README.mdKenneth Reitzbefore adoptionc13ccd1

line 3why, one step back
3<span align="center">

Update README.mdKenneth Reitzbefore adoptiond675d83

line 4why, one step back
4

Update README.mdKenneth Reitzbefore adoptionc13ccd1

line 5why, one step back
5<pre>

Update README.mdKenneth Reitzbefore adoption0f1251b

line 6why, one step back
6 <a href="https://2.python-requests.org/"><img src="https://raw.githubusercontent.com/psf/requests/master/ext/requests-logo.png" align="center" /></a>

Update README.mdKenneth Reitzbefore adoption7c71cb9

line 7why, one step back
7 <div align="left">

Update README.mdKenneth Reitzbefore adoption36cc7bb

line 8why, one step back
8 <p></p>

Update README.mdKenneth Reitzbefore adoption7c71cb9

line 9why, one step back
9 <code> Python 3.7.4 (default, Sep 7 2019, 18:27:02)</code>

Update README.mdKenneth Reitzbefore adoption537ac3c

line 10why, one step back
10 <code> >>> <strong>import requests</strong></code>

Update README.mdKenneth Reitzbefore adoption7c71cb9

lines 11–12why, one step back
11 <code> >>> r = requests.get('https://api.github.com/repos/psf/requests')</code>
12 <code> >>> r.json()["description"]</code>

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d

line 13why, one step back
13 <code> 'A simple, yet elegant HTTP library. Handcrafted, with ♥, for the Python community.'</code>

Update README.mdKenneth Reitzbefore adoption7c71cb9

line 14why, one step back
14 </div>

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption42926b5

line 15why, one step back
15

Update README.mdKenneth Reitzbefore adoption0f1251b

line 16why, one step back
16<a href="https://www.codecademy.com/articles/http-requests"><img src="https://github.com/psf/requests/blob/master/ext/flower-of-life.jpg?raw=true" /></a>

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption42926b5

line 17why, one step back
17

Update README.mdKenneth Reitzbefore adoption4b9e5d0

line 18why, one step back
18 <p align="center">

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

lines 19–21why, one step back
19This software has been designed for you, with much joy,
20by <a href="https://kennethreitz.org/">Kenneth Reitz</a> & is secured by The <a href="https://www.python.org/psf/">Python Software Foundation</a>. 21 </p>

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d

lines 22–24why, one step back
22<p>&nbsp;</p>
23<img src="https://github.com/psf/requests/blob/master/ext/flourish.png?raw=true" />24</pre>

Update README.mdKenneth Reitzbefore adoption9b51d7c

line 25why, one step back
25

Update README.mdKenneth Reitzbefore adoptionc13ccd1

lines 26–27why, one step back
26</span>
27

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d

line 28why, one step back
28<p>&nbsp;</p><p>&nbsp;</p>

Update README.mdKenneth Reitzbefore adoptionc13ccd1

line 29why, one step back
29

Update README.mdKenneth Reitzbefore adoption458496d

line 30why, one step back
30<p align="center"><strong>Requests</strong> is an elegant and simple HTTP library for Python, built with ♥.</p>

Update README.mdKenneth Reitzbefore adoptionc51a9ef

line 31why, one step back
31

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 32why, one step back
32```pycon

Merge pull request #5054 from imikay/patch-1Kenneth Reitzbefore adoptionb18f765

line 33why, one step back
33>>> import requests

readmeKenneth Reitzbefore adoption4e7e270

lines 34–46why, one step back
34>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
35>>> r.status_code3620037>>> r.headers['content-type']38'application/json; charset=utf8'39>>> r.encoding40'utf-8'41>>> r.text42u'{"type":"User"...'43>>> r.json()44{u'disk_usage': 368627, u'private_gists': 484, ...}45```46

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

lines 47–49why, one step back
47<p align="center"><a href="https://pepy.tech/project/requests" rel="nofollow"><img src="https://camo.githubusercontent.com/e1dedc9f5ce5cd6b6c699f33d2e812daadcf3645/68747470733a2f2f706570792e746563682f62616467652f7265717565737473" alt="Downloads" data-canonical-src="https://pepy.tech/badge/requests" style="max-width:100%;"></a>
48<a href="https://pypi.org/project/requests/" rel="nofollow"><img src="https://camo.githubusercontent.com/6d78aeec0a9a1cfe147ad064bfb99069e298e29b/68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f72657175657374732e737667" alt="image" data-canonical-src="https://img.shields.io/pypi/pyversions/requests.svg" style="max-width:100%;"></a>49<a href="https://github.com/psf/requests/graphs/contributors"><img src="https://camo.githubusercontent.com/a70ea15870b38bba9203b969f6a6b7e7845fbb8a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f7073662f72657175657374732e737667" alt="image" data-canonical-src="https://img.shields.io/github/contributors/psf/requests.svg" style="max-width:100%;"></a></p>

readmeKenneth Reitzbefore adoption4e7e270

line 50why, one step back
50

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 51why, one step back
51---------------------------------------------------------------------

readmeKenneth Reitzbefore adoption4e7e270

line 52why, one step back
52

Update README.mdKenneth Reitzbefore adoption0f71067

lines 53–54why, one step back
53<p>&nbsp;</p>
54

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 55why, one step back
55Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data — but nowadays, just use the `json` method!

readmeKenneth Reitzbefore adoption4e7e270

line 56why, one step back
56

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 57why, one step back
57Requests is one of the most downloaded Python packages of all time, pulling in around `14M downloads / week`— according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `367_296` repositories. You can trust this code.

readmeKenneth Reitzbefore adoption4e7e270

line 58why, one step back
58

Update README.mdKenneth Reitzbefore adoptionde1c200

lines 59–60why, one step back
59<p>&nbsp;</p>
60

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 61why, one step back
61<h2 align="center">Supported Features & Best–Practices</h2>

readmeKenneth Reitzbefore adoption4e7e270

line 62why, one step back
62

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 63why, one step back
63Requests is ready for the demands of building robust and reliable HTTP–speaking applications, on today's web (or your own infrastructure).

readmeKenneth Reitzbefore adoption4e7e270

line 64why, one step back
64

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

lines 65–77why, one step back
65<pre class="test">
66 + International Domains and URLs + Keep-Alive & Connection Pooling67 + Sessions with Cookie Persistence + Browser-style SSL Verification 68 + Basic & Digest Authentication + Familiar `dict`–like Cookies 69 + Automatic Decompression of Content + Automatic Content Decoding 70 + Automatic Connection Pooling + Unicode Response Bodies<super>*</super>71 + Multi-part File Uploads + SOCKS Proxy Support 72 + Connection Timeouts + Streaming Downloads73 + Automatic honoring of `.netrc` + Chunked HTTP Requests 74 75 &, of course, rock–solid stability!76</pre>77</div>

Update README.mdKenneth Reitzbefore adoptionac9f0d7

line 78why, one step back
78

Update README.mdKenneth Reitzbefore adoption30a1608

line 79why, one step back
79<p align="center">

Update README.mdKenneth Reitzbefore adoptionac9f0d7

line 80why, one step back
80 ✨ 🍰 ✨

Update README.mdKenneth Reitzbefore adoption30a1608

line 81why, one step back
81</p>

readmeKenneth Reitzbefore adoption4e7e270

line 82why, one step back
82

Update README.mdKenneth Reitzbefore adoption9f35ebd

line 83why, one step back
83<p>&nbsp;</p>

Update README.mdKenneth Reitzbefore adoption30a1608

line 84why, one step back
84

Update README.mdKenneth Reitzbefore adoptioncf77263

lines 85–86why, one step back
85Requests Module Installation
86----------------------------

readmeKenneth Reitzbefore adoption4e7e270

line 87why, one step back
87

Update README.mdKenneth Reitzbefore adoption0f1251b

line 88why, one step back
88The recommended way to intall the `requests` module is to simply use [`pipenv`](http://pipenv.org/) (or `pip`, of

readmeKenneth Reitzbefore adoption4e7e270

lines 89–90why, one step back
89course):
90

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 91why, one step back
91```console

readmeKenneth Reitzbefore adoption4e7e270

line 92why, one step back
92$ pipenv install requests

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

lines 93–95why, one step back
93Adding requests to Pipfile's [packages]…
94✔ Installation Succeeded95…

readmeKenneth Reitzbefore adoption4e7e270

lines 96–97why, one step back
96```
97

Update README.mdKenneth Reitzbefore adoption446911b

line 98why, one step back
98Requests officially supports Python 2.7 & 3.4–3.8.

readmeKenneth Reitzbefore adoption4e7e270

line 99why, one step back
99

Update README.mdKenneth Reitzbefore adoptione11caeb

lines 100–101why, one step back
100-------------------------------------
101

Update README.mdKenneth Reitzbefore adoption3ed0f8f

line 102why, one step back
102## P.S. — Documentation is Available at [`//2.python-requests.org`](https://2.python-requests.org/).

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5

line 103why, one step back
103

Update README.mdKenneth Reitzbefore adoption30a1608

lines 104–106why, one step back
104<p align="center">
105 <a href="https://2.python-requests.org/"><img src="https://raw.githubusercontent.com/psf/requests/master/ext/ss.png" align="center" /></a>106</p>

readmeKenneth Reitzbefore adoption4e7e270

line 107why, one step back
107

Update README.mdKenneth Reitzbefore adoptionbe2fe0c

lines 108–110why, one step back
108
109------------------110

Update README.mdKenneth Reitzbefore adoptionac9f0d7

line 111why, one step back
111

Update README.mdKenneth Reitzbefore adoptionabe22b1

line 112why, one step back
112<p align="center">

Update README.mdKenneth Reitzbefore adoption0f1251b

line 113why, one step back
113 <a href="https://github.com/psf/requests/blob/master/LICENSE"><img src="https://raw.githubusercontent.com/psf/requests/master/ext/license.png" align="center" /></a>

Update README.mdKenneth Reitzbefore adoptionabe22b1

lines 114–115why, one step back
114</p>
115

Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d

line 116why, one step back
116