Skip to content
Myr

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

1 file+25 added−25 removed

modified:README.rst+25 added-25 removed
5 unmodified lines
67.. image:: https://img.shields.io/pypi/dm/requests.svg8 :target: https://pypi.python.org/pypi/requests910**Requests** is the only *Non-GMO* HTTP library for Python, safe for human11consumption.1213Consumption of other HTTP libraries may result in dangerous side-effects,14including: security vulnerabilities, verbose code, reinventing the wheel,15constantly reading documentation, depression, headaches, or even death.161213Requests is an Apache2 Licensed HTTP library, written in Python, for human14beings.1516Most existing Python modules for sending HTTP requests are extremely17verbose and cumbersome. Python's builtin urllib2 module provides most of18the HTTP capabilities you should need, but the api is thoroughly broken.19It requires an enormous amount of work (even method overrides) to20perform the simplest of tasks.2122Things shouldn't be this way. Not in Python.2317.. code-block:: python1819 >>> 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, ...}3034See `the same code, without Requests <https://gist.github.com/973705>`_.31See `the same code, before Requests <https://gist.github.com/973705>`_.3236Requests allow you to send HTTP/1.1 requests. You can add headers, form data,37multipart files, and parameters with simple Python dictionaries, and access the38response 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 crazy40hacks for you.33Requests allows you to send *organic, grass-fed* HTTP/1.1 requests, very well.34Headers, cookies, json/form data, multipart files, and url parameters can all35be provided with simple Python dictionaries. SSL certificates are automatically36verified against a carefully crafted bundle of root certificates, included.37Responses feature RFC-compliant redirection history, unicode/bytes> bodies, a38case-insensitive header dictionary, and more.394043Features44--------41Special Features42----------------4344- 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 support595960Installation61------------6263To install Requests, simply:
23 unmodified lines