revised readme
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Kenneth Reitz · committed by Kenneth Reitz · parent 6e35ec4 · Browse files · 1 file·+25 added−25 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+25 added−25 removed
- other:+25 added−25 removed
Provenance
- Commit
20b4bb7- Tree
b9b04b2- Author
Kenneth Reitz <me@kennethreitz.org>- Committer
Kenneth Reitz <me@kennethreitz.org>- Parent
6e35ec4
1 file changed+25 added−25 removed
modified:README.rst+25 added-25 removed
5 unmodified lines6 7 .. image:: https://img.shields.io/pypi/dm/requests.svg8 :target: https://pypi.python.org/pypi/requests9 10+**Requests** is the only *Non-GMO* HTTP library for Python, safe for human11+consumption.12 13+Consumption of other HTTP libraries may result in dangerous side-effects,14+including: security vulnerabilities, verbose code, reinventing the wheel,15+constantly reading documentation, depression, headaches, or even death.16 12-13-Requests is an Apache2 Licensed HTTP library, written in Python, for human14-beings.15-16-Most existing Python modules for sending HTTP requests are extremely17-verbose and cumbersome. Python's builtin urllib2 module provides most of18-the HTTP capabilities you should need, but the api is thoroughly broken.19-It requires an enormous amount of work (even method overrides) to20-perform the simplest of tasks.21-22-Things shouldn't be this way. Not in Python.23-17 .. code-block:: python18 19 >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))20 >>> r.status_code28- 20421+ 20022 >>> r.headers['content-type']30- 'application/json'23+ 'application/json; charset=utf8'24+ >>> r.encoding25+ 'utf-8'26 >>> r.text32- ...27+ u'{"type":"User"...'28+ >>> r.json()29+ {u'disk_usage': 368627, u'private_gists': 484, ...}30 34-See `the same code, without Requests <https://gist.github.com/973705>`_.31+See `the same code, before Requests <https://gist.github.com/973705>`_.32 36-Requests allow you to send HTTP/1.1 requests. You can add headers, form data,37-multipart files, and parameters with simple Python dictionaries, and access the38-response data in the same way. It's powered by httplib and `urllib339-<https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy40-hacks for you.33+Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, very well.34+Headers, cookies, json/form data, multipart files, and url parameters can all35+be provided with simple Python dictionaries. SSL certificates are automatically36+verified against a carefully crafted bundle of root certificates, included.37+Responses feature RFC-compliant redirection history, unicode/bytes> bodies, a38+case-insensitive header dictionary, and more.39 40 43-Features44---------41+Special Features42+----------------43 44 - International Domains and URLs45 - Keep-Alive & Connection Pooling46 - Sessions with Cookie Persistence47 - Browser-style SSL Verification48 - Basic/Digest Authentication49 - Elegant Key/Value Cookies50 - Automatic Decompression51+- Automatic Content Decoding52 - Unicode Response Bodies53 - Multipart File Uploads54+- HTTP(S) proxy support55 - Connection Timeouts56+- Streaming Downloads57+- Chunked Requests58 - Thread-safety57-- HTTP(S) proxy support59 59-60 Installation61 ------------62 63 To install Requests, simply:23 unmodified lines