Skip to content
Myr

api.rst

This file

Path

docs/api.rst

144 lines · 2.3 KiB

Last changed by

Merge branch 'develop'Kenneth Reitzbefore adoption1165bec

History of this file

Take it

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 1–15why, one step back
1.. _api:
23API4===56.. module:: requests78This part of the documentation covers all the interfaces of Requests. For9parts where Requests depends on external libraries, we document the most10important right here and provide links to the canonical documentation.111213Main Interface14--------------15

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

lines 16–17why, one step back
16All of Request's functionality can be accessed by these 7 methods.
17They all return an instance of the :class:`Response <Response>` object.

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 18why, one step back
18

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 19why, one step back
19.. autofunction:: request

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 20–28why, one step back
20
21---------------------222324.. autoclass:: Response25 :inherited-members:2627---------------------28

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 29why, one step back
29.. autofunction:: head

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 30–32why, one step back
30.. autofunction:: get
31.. autofunction:: post32.. autofunction:: put

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 33why, one step back
33.. autofunction:: patch

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 34why, one step back
34.. autofunction:: delete

Merge branch 'release/0.5.0'Kenneth Reitzbefore adoption2d98ca7

line 35why, one step back
35

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 36why, one step back
36

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

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

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 38why, one step back
38

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

line 39why, one step back
39.. autofunction:: session

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 40–41why, one step back
40
41

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 42–64why, one step back
42
43Exceptions44~~~~~~~~~~4546.. module:: requests4748.. autoexception:: RequestException49.. autoexception:: ConnectionError50.. autoexception:: HTTPError51.. autoexception:: URLRequired52.. autoexception:: TooManyRedirects535455.. _configurations:5657Configurations58--------------5960.. automodule:: requests.defaults616263.. _async:64

Merge branch 'release/0.6.4'Kenneth Reitzbefore adoption4f6fc98

lines 65–66why, one step back
65Async
66-----

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 67why, one step back
67

Merge branch 'release/0.6.4'Kenneth Reitzbefore adoption4f6fc98

line 68why, one step back
68.. module:: requests.async

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 69why, one step back
69

Merge branch 'release/0.6.4'Kenneth Reitzbefore adoption4f6fc98

lines 70–81why, one step back
70
71.. autofunction:: map72.. autofunction:: request73.. autofunction:: head74.. autofunction:: get75.. autofunction:: post76.. autofunction:: put77.. autofunction:: patch78.. autofunction:: delete798081

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

lines 82–83why, one step back
82Utilities
83---------

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 84why, one step back
84

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

lines 85–86why, one step back
85These functions are used internally, but may be useful outside of
86Requests.

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 87why, one step back
87

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 88why, one step back
88.. module:: requests.utils

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 89why, one step back
89

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 90–97why, one step back
90Status Code Lookup
91~~~~~~~~~~~~~~~~~~9293.. autofunction:: requests.codes9495::9697 >>> requests.codes['temporary_redirect']

Merge branch 'develop'Kenneth Reitzbefore adoption1165bec

line 98why, one step back
98 307

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 99–100why, one step back
99
100 >>> requests.codes.teapot

Merge branch 'develop'Kenneth Reitzbefore adoption1165bec

line 101why, one step back
101 418

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 102–103why, one step back
102
103 >>> requests.codes['\o/']

Merge branch 'develop'Kenneth Reitzbefore adoption1165bec

line 104why, one step back
104 200

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

line 105why, one step back
105

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

lines 106–107why, one step back
106Cookies
107~~~~~~~

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 108why, one step back
108

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

lines 109–122why, one step back
109.. autofunction:: dict_from_cookiejar
110.. autofunction:: cookiejar_from_dict111.. autofunction:: add_dict_to_cookiejar112113114Encodings115~~~~~~~~~116117.. autofunction:: get_encodings_from_content118.. autofunction:: get_encoding_from_headers119.. autofunction:: get_unicode_from_response120.. autofunction:: decode_gzip121122

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 123–129why, one step back
123Internals
124---------125126These items are an internal component to Requests, and should never be127seen by the end user (developer). This part of the API documentation128exists for those who are extending the functionality of Requests.129

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 130why, one step back
130

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

lines 131–133why, one step back
131Classes
132~~~~~~~133

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 134–136why, one step back
134.. autoclass:: requests.Response
135 :inherited-members:136

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 137why, one step back
137.. autoclass:: requests.Request

Merge branch 'release/0.4.1'Kenneth Reitzbefore adoptionadd6fea

line 138why, one step back
138 :inherited-members:

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 139why, one step back
139

Merge branch 'develop'Kenneth Reitzbefore adoption6e9cb09

lines 140–143why, one step back
140.. _sessionapi:
141142.. autoclass:: requests.Session143 :inherited-members:

Merge branch 'release/0.6.3'Kenneth Reitzbefore adoption1551158

line 144why, one step back
144