Skip to content
Myr

README.rst

This file

Path

README.rst

85 lines · 2.9 KiB

Last changed by

Merge pull request #2373 from frewsxcv/patch-1Ian Cordascobefore adoption1d9bf43

History of this file

Take it

The walk stopped after 200 commits: lines older than c86de38 point at it.

Merge pull request #1720 from Lukasa/docsCory Benfieldbefore adoptionc86de38

lines 1–21why, one step back
1Requests: HTTP for Humans
2=========================34.. image:: https://badge.fury.io/py/requests.png5 :target: http://badge.fury.io/py/requests67.. image:: https://pypip.in/d/requests/badge.png8 :target: https://crate.io/packages/requests/91011Requests is an Apache2 Licensed HTTP library, written in Python, for human12beings.1314Most existing Python modules for sending HTTP requests are extremely15verbose and cumbersome. Python's builtin urllib2 module provides most of16the HTTP capabilities you should need, but the api is thoroughly broken.17It requires an enormous amount of work (even method overrides) to18perform the simplest of tasks.1920Things shouldn't be this way. Not in Python.21

Merge pull request #2373 from frewsxcv/patch-1Ian Cordascobefore adoption1d9bf43

line 22why, one step back
22.. code-block:: python

Merge pull request #1720 from Lukasa/docsCory Benfieldbefore adoptionc86de38

lines 23–85why, one step back
23
24 >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))25 >>> r.status_code26 20427 >>> r.headers['content-type']28 'application/json'29 >>> r.text30 ...3132See `the same code, without Requests <https://gist.github.com/973705>`_.3334Requests allow you to send HTTP/1.1 requests. You can add headers, form data,35multipart files, and parameters with simple Python dictionaries, and access the36response data in the same way. It's powered by httplib and `urllib337<https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy38hacks for you.394041Features42--------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- Unicode Response Bodies52- Multipart File Uploads53- Connection Timeouts54- Thread-safety55- HTTP(S) proxy support565758Installation59------------6061To install Requests, simply:6263.. code-block:: bash6465 $ pip install requests666768Documentation69-------------7071Documentation is available at http://docs.python-requests.org/.727374Contribute75----------7677#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a `Contributor Friendly`_ tag for issues that should be ideal for people who are not very familiar with the codebase yet.78#. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email @sigmavirus24 and he will happily help you via email, Skype, remote pairing or whatever you are comfortable with.79#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).80#. Write a test which shows that the bug was fixed or that the feature works as expected.81#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.8283.. _`the repository`: http://github.com/kennethreitz/requests84.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst85.. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open