Skip to content
Myr

index.rst

This file

Path

docs/index.rst

89 lines · 2.5 KiB

Last changed by

testimonial cleanupKenneth Reitzbefore adoptionef02d02

History of this file

Take it

Documentation start.Kenneth Reitzbefore adoptione76fa91

lines 1–5why, one step back
1.. Requests documentation master file, created by
2 sphinx-quickstart on Sun Feb 13 23:54:25 2011.3 You can adapt this file completely to your liking, but it should at least4 contain the root `toctree` directive.5

better titleKenneth Reitzbefore adoption9b16562

lines 6–7why, one step back
6Requests: HTTP for Humans
7=========================

initial doc indexKenneth Reitzbefore adoption80b71a0

line 8why, one step back
8

docs updateKenneth Reitzbefore adoptiond18ea48

line 9why, one step back
9Release v\ |version|. (:ref:`Installation <install>`)

initial doc indexKenneth Reitzbefore adoption80b71a0

line 10why, one step back
10

better titleKenneth Reitzbefore adoption9b16562

line 11why, one step back
11Requests is an :ref:`ISC Licensed <isc>` HTTP library, written in Python, for human beings.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 12why, one step back
12

much better indexKenneth Reitzbefore adoption319b570

line 13why, one step back
13Most existing Python modules for sending HTTP requests are extremely verbose

urllib2Kenneth Reitzbefore adoption1218715

line 14why, one step back
14and cumbersome. Python's builtin **urllib2** module provides most of

better indexKenneth Reitzbefore adoption874a874

line 15why, one step back
15the HTTP capabilities you should need, but the api is thoroughly **broken**.

config updateKenneth Reitzbefore adoptionb7970c2

line 16why, one step back
16It requires an *enormous* amount of work (even method overrides) to perform the simplest of tasks.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 17why, one step back
17

orgsKenneth Reitzbefore adoption1ebf3af

lines 18–19why, one step back
18Things shouldn’t be this way. Not in Python.
19

initial doc indexKenneth Reitzbefore adoption80b71a0

lines 20–21why, one step back
20::
21

example udpateKenneth Reitzbefore adoption70857f3

lines 22–26why, one step back
22 >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
23 >>> r.status_code24 20025 >>> r.headers['content-type']26 'application/json'

initial doc indexKenneth Reitzbefore adoption80b71a0

line 27why, one step back
27

example udpateKenneth Reitzbefore adoption70857f3

line 28why, one step back
28See `the same code, without Requests <https://gist.github.com/973705>`_.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 29why, one step back
29

better indexKenneth Reitzbefore adoption874a874

lines 30–34why, one step back
30Requests allow you to send **GET**, **HEAD**, **PUT**,
31**POST**, and **DELETE** HTTP requests. You can add headers, form data,32multipart files, and parameters with simple Python dictionaries, and access the33response data in the same way. It's powered by :py:class:`urllib2`, but it does34all the hard work and crazy hacks for you.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 35why, one step back
35

much better indexKenneth Reitzbefore adoption319b570

line 36why, one step back
36Testimonals

index cleanupKenneth Reitzbefore adoption0f76e17

line 37why, one step back
37-----------

orgsKenneth Reitzbefore adoption1ebf3af

line 38why, one step back
38

testimonial cleanupKenneth Reitzbefore adoptionef02d02

line 39why, one step back
39`Twitter, Inc <http://twitter.com>`_ uses Requests internally.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 40why, one step back
40

much better indexKenneth Reitzbefore adoption319b570

lines 41–42why, one step back
41**Daniel Greenfeld**
42 Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to @kennethreitz's request library. Today has been AWESOME.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 43why, one step back
43

much better indexKenneth Reitzbefore adoption319b570

line 44why, one step back
44**Kenny Meyers**

testimonialsKenneth Reitzbefore adoption6b36911

lines 45–51why, one step back
45 Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful, simple, Pythonic.
4647**Rich Leland**48 Requests is awesome. That is all.4950**Steve Pike**51 I can never remember how to do it the regular way. ``import requests; requests.get()`` is just so easy!

initial doc indexKenneth Reitzbefore adoption80b71a0

lines 52–53why, one step back
52
53

much better indexKenneth Reitzbefore adoption319b570

line 54why, one step back
54User Guide

index cleanupKenneth Reitzbefore adoption0f76e17

line 55why, one step back
55----------

initial doc indexKenneth Reitzbefore adoption80b71a0

line 56why, one step back
56

much better indexKenneth Reitzbefore adoption319b570

line 57why, one step back
57This part of the documentation, which is mostly prose, begins with some background information about Requests, then focuses on step-by-step instructions for getting the most out of Requests.

initial doc indexKenneth Reitzbefore adoption80b71a0

line 58why, one step back
58

much better indexKenneth Reitzbefore adoption319b570

lines 59–60why, one step back
59.. toctree::
60 :maxdepth: 2

initial doc indexKenneth Reitzbefore adoption80b71a0

line 61why, one step back
61

docs refactorKenneth Reitzbefore adoptionf1f5788

lines 62–63why, one step back
62 user/intro
63 user/install

no quickstart till doneKenneth Reitzbefore adoptiond7f49f3

line 64why, one step back
64.. user/quickstart

docs refactorKenneth Reitzbefore adoptionf1f5788

line 65why, one step back
65 user/advanced

initial doc indexKenneth Reitzbefore adoption80b71a0

line 66why, one step back
66

Documentation start.Kenneth Reitzbefore adoptione76fa91

line 67why, one step back
67

much better indexKenneth Reitzbefore adoption319b570

line 68why, one step back
68API Documentation

index cleanupKenneth Reitzbefore adoption0f76e17

line 69why, one step back
69-----------------

Documentation start.Kenneth Reitzbefore adoptione76fa91

line 70why, one step back
70

much better indexKenneth Reitzbefore adoption319b570

lines 71–73why, one step back
71If you are looking for information on a specific function, class or method,
72this part of the documentation is for you.73

Documentation start.Kenneth Reitzbefore adoptione76fa91

lines 74–75why, one step back
74.. toctree::
75 :maxdepth: 2

much better indexKenneth Reitzbefore adoption319b570

lines 76–79why, one step back
76
77 api7879

index cleanupKenneth Reitzbefore adoption0f76e17

lines 80–81why, one step back
80Developer Guide
81---------------

much better indexKenneth Reitzbefore adoption319b570

lines 82–88why, one step back
82
83If you want to contribute to the project, this part of the documentation is for84you.8586.. toctree::87 :maxdepth: 288

docs refactorKenneth Reitzbefore adoptionf1f5788

line 89why, one step back
89 dev/internals