README.md
This file
Path
README.md
116 lines · 5.1 KiB · Markdown
Last changed by
Update README.mdKenneth Reitzbefore adoption0f71067
History of this fileTake it
Update README.mdKenneth Reitzbefore adoption6b89c87
lines 1–2why, one step back12Update README.mdKenneth Reitzbefore adoptionc13ccd1
line 3why, one step back3<span align="center">Update README.mdKenneth Reitzbefore adoptiond675d83
line 4why, one step back4 Update README.mdKenneth Reitzbefore adoptionc13ccd1
line 5why, one step back5<pre>Update README.mdKenneth Reitzbefore adoption0f1251b
line 6why, one step back6 <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 back7 <div align="left">Update README.mdKenneth Reitzbefore adoption36cc7bb
line 8why, one step back8 <p></p>Update README.mdKenneth Reitzbefore adoption7c71cb9
line 9why, one step back9 <code> Python 3.7.4 (default, Sep 7 2019, 18:27:02)</code>Update README.mdKenneth Reitzbefore adoption537ac3c
line 10why, one step back10 <code> >>> <strong>import requests</strong></code>Update README.mdKenneth Reitzbefore adoption7c71cb9
lines 11–12why, one step back11 <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 back13 <code> 'A simple, yet elegant HTTP library. Handcrafted, with ♥, for the Python community.'</code>Update README.mdKenneth Reitzbefore adoption7c71cb9
line 14why, one step back14 </div>Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption42926b5
line 15why, one step back15 Update README.mdKenneth Reitzbefore adoption0f1251b
line 16why, one step back16<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 back17 Update README.mdKenneth Reitzbefore adoption4b9e5d0
line 18why, one step back18 <p align="center">Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 19–21why, one step back19This 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 back22<p> </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 back25Update README.mdKenneth Reitzbefore adoptionc13ccd1
lines 26–27why, one step back26</span>27Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d
line 28why, one step back28<p> </p><p> </p>Update README.mdKenneth Reitzbefore adoptionc13ccd1
line 29why, one step back29Update README.mdKenneth Reitzbefore adoption458496d
line 30why, one step back30<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 back31Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 32why, one step back32```pyconMerge pull request #5054 from imikay/patch-1Kenneth Reitzbefore adoptionb18f765
line 33why, one step back33>>> import requestsreadmeKenneth Reitzbefore adoption4e7e270
lines 34–46why, one step back34>>> 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```46Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 47–49why, one step back47<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 back50Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 51why, one step back51---------------------------------------------------------------------readmeKenneth Reitzbefore adoption4e7e270
line 52why, one step back52Update README.mdKenneth Reitzbefore adoption0f71067
lines 53–54why, one step back53<p> </p>54Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 55why, one step back55Requests 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 back56Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 57why, one step back57Requests 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 back58Update README.mdKenneth Reitzbefore adoptionde1c200
lines 59–60why, one step back59<p> </p>60Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 61why, one step back61<h2 align="center">Supported Features & Best–Practices</h2>readmeKenneth Reitzbefore adoption4e7e270
line 62why, one step back62Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 63why, one step back63Requests 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 back64Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 65–77why, one step back65<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 back78Update README.mdKenneth Reitzbefore adoption30a1608
line 79why, one step back79<p align="center">Update README.mdKenneth Reitzbefore adoptionac9f0d7
line 80why, one step back80 ✨ 🍰 ✨Update README.mdKenneth Reitzbefore adoption30a1608
line 81why, one step back81</p>readmeKenneth Reitzbefore adoption4e7e270
line 82why, one step back82Update README.mdKenneth Reitzbefore adoption9f35ebd
line 83why, one step back83<p> </p>Update README.mdKenneth Reitzbefore adoption30a1608
line 84why, one step back84Update README.mdKenneth Reitzbefore adoptioncf77263
lines 85–86why, one step back85Requests Module Installation86----------------------------readmeKenneth Reitzbefore adoption4e7e270
line 87why, one step back87Update README.mdKenneth Reitzbefore adoption0f1251b
line 88why, one step back88The recommended way to intall the `requests` module is to simply use [`pipenv`](http://pipenv.org/) (or `pip`, ofreadmeKenneth Reitzbefore adoption4e7e270
lines 89–90why, one step back89course):90Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 91why, one step back91```consolereadmeKenneth Reitzbefore adoption4e7e270
line 92why, one step back92$ pipenv install requestsMerge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 93–95why, one step back93Adding requests to Pipfile's [packages]…94✔ Installation Succeeded95…readmeKenneth Reitzbefore adoption4e7e270
lines 96–97why, one step back96```97Update README.mdKenneth Reitzbefore adoption446911b
line 98why, one step back98Requests officially supports Python 2.7 & 3.4–3.8.readmeKenneth Reitzbefore adoption4e7e270
line 99why, one step back99Update README.mdKenneth Reitzbefore adoptione11caeb
lines 100–101why, one step back100-------------------------------------101Update README.mdKenneth Reitzbefore adoption3ed0f8f
line 102why, one step back102## 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 back103Update README.mdKenneth Reitzbefore adoption30a1608
lines 104–106why, one step back104<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 back107Update README.mdKenneth Reitzbefore adoptionbe2fe0c
lines 108–110why, one step back108109------------------110Update README.mdKenneth Reitzbefore adoptionac9f0d7
line 111why, one step back111Update README.mdKenneth Reitzbefore adoptionabe22b1
line 112why, one step back112<p align="center">Update README.mdKenneth Reitzbefore adoption0f1251b
line 113why, one step back113 <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 back114</p>115Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption6831d2d
line 116why, one step back116