README.md
This file
Path
README.md
103 lines · 4.5 KiB · Markdown
Last changed by
Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
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>Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 6why, one step back6 <img src="https://raw.githubusercontent.com/psf/requests/master/ext/requests-logo.png" align="center" />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>Update README.mdKenneth Reitzbefore adoption3423b51
line 13why, one step back13 <code> 'An elegant & simple 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 Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption7ce4691
line 16why, one step back16<img src="https://github.com/psf/requests/blob/master/ext/flower-of-life.jpg?raw=true" />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–22why, 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>22 </pre>Update README.mdKenneth Reitzbefore adoption9b51d7c
line 23why, one step back23Update README.mdKenneth Reitzbefore adoptionc13ccd1
lines 24–27why, one step back24</span>2526---------------------27Update README.mdKenneth Reitzbefore adoptionc51a9ef
line 28why, one step back28Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 29why, one step back29<p align="center"><strong>Requests</strong> is an elegant and simple HTTP library for Python, built with ♥</p>Update README.mdKenneth Reitzbefore adoptionc51a9ef
line 30why, one step back30Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 31why, one step back31```pyconMerge pull request #5054 from imikay/patch-1Kenneth Reitzbefore adoptionb18f765
line 32why, one step back32>>> import requestsreadmeKenneth Reitzbefore adoption4e7e270
lines 33–45why, one step back33>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))34>>> r.status_code3520036>>> r.headers['content-type']37'application/json; charset=utf8'38>>> r.encoding39'utf-8'40>>> r.text41u'{"type":"User"...'42>>> r.json()43{u'disk_usage': 368627, u'private_gists': 484, ...}44```45Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 46–48why, one step back46<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>47<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>48<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 49why, one step back49Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 50why, one step back50---------------------------------------------------------------------readmeKenneth Reitzbefore adoption4e7e270
line 51why, one step back51Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 52why, one step back52Requests 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 53why, one step back53Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 54why, one step back54Requests 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 55why, one step back55Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 56why, one step back56<h2 align="center">Supported Features & Best–Practices</h2>readmeKenneth Reitzbefore adoption4e7e270
line 57why, one step back57Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 58why, one step back58Requests 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 59why, one step back59Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 60–72why, one step back60<pre class="test">61 + International Domains and URLs + Keep-Alive & Connection Pooling62 + Sessions with Cookie Persistence + Browser-style SSL Verification 63 + Basic & Digest Authentication + Familiar `dict`–like Cookies 64 + Automatic Decompression of Content + Automatic Content Decoding 65 + Automatic Connection Pooling + Unicode Response Bodies<super>*</super>66 + Multi-part File Uploads + SOCKS Proxy Support 67 + Connection Timeouts + Streaming Downloads68 + Automatic honoring of `.netrc` + Chunked HTTP Requests 69 70 &, of course, rock–solid stability!71</pre>72</div>readmeKenneth Reitzbefore adoption4e7e270
lines 73–76why, one step back7374Installation75------------76Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 77why, one step back77To install **Requests**, simply use [**pipenv**](http://pipenv.org/) (or **pip**, ofreadmeKenneth Reitzbefore adoption4e7e270
lines 78–79why, one step back78course):79Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 80why, one step back80```consolereadmeKenneth Reitzbefore adoption4e7e270
line 81why, one step back81$ pipenv install requestsMerge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 82–84why, one step back82Adding requests to Pipfile's [packages]…83✔ Installation Succeeded84…readmeKenneth Reitzbefore adoption4e7e270
lines 85–86why, one step back85```86Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 87–88why, one step back87Requests officially supports Python 2.7 & 3.4–3.8, and runs great on88PyPy.readmeKenneth Reitzbefore adoption4e7e270
line 89why, one step back89Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 90why, one step back90readmeKenneth Reitzbefore adoption4e7e270
lines 91–96why, one step back91Documentation92-------------9394Fantastic documentation is available at95<http://docs.python-requests.org/>, for a limited time only.96Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
line 97why, one step back97Your satisfaction is guaranteed.Update README.mdKenneth Reitzbefore adoption59dac47
lines 98–99why, one step back9899✨ 🍰 ✨Merge branch 'master' of github.com:psf/requestsKenneth Reitzbefore adoption26466b5
lines 100–103why, one step back100101<p align="center">102 <img src="https://github.com/psf/requests/blob/master/ext/flourish.png?raw=true" />103</p>