Requests is an HTTP library, written in Python, for human beings. Basic GET usage:
>>> import requests >>> r = requests.get('https://www.python.org') >>> r.status_code 200 >>> b'Python is a programming language' in r.content True
... or POST:
>>> payload = dict(key1='value1', key2='value2') >>> r = requests.post('https://httpbin.org/post', data=payload) >>> print(r.text) { ... "form": { "key1": "value1", "key2": "value2" }, ... }
The other HTTP methods are supported - see requests.api
. Full documentation
is at <https://requests.readthedocs.io>.
Unknown Field: copyright | |
| |
Unknown Field: license | |
Apache 2.0, see LICENSE for more details. |
Module | adapters |
requests.adapters ~~~~~~~~~~~~~~~~~ |
Module | auth |
requests.auth ~~~~~~~~~~~~~ |
Module | cookies |
requests.cookies ~~~~~~~~~~~~~~~~ |
Module | exceptions |
requests.exceptions ~~~~~~~~~~~~~~~~~~~ |
Module | models |
requests.models ~~~~~~~~~~~~~~~ |
Module | sessions |
requests.sessions ~~~~~~~~~~~~~~~~~ |
Module | status_codes |
The codes object defines a mapping from common names for HTTP statuses to their numerical codes, accessible either as attributes or as dictionary items. |
Module | utils |
requests.utils ~~~~~~~~~~~~~~ |
Module | __version__ |
Undocumented |
Module | _internal_utils |
requests._internal_utils ~~~~~~~~~~~~~~ |
Module | api |
requests.api ~~~~~~~~~~~~ |
Module | certs |
requests.certs ~~~~~~~~~~~~~~ |
Module | compat |
requests.compat ~~~~~~~~~~~~~~~ |
Module | help |
Module containing bug report helper(s). |
Module | hooks |
requests.hooks ~~~~~~~~~~~~~~ |
Module | packages |
Undocumented |
Module | structures |
requests.structures ~~~~~~~~~~~~~~~~~~~ |
From __init__.py
:
Variable | chardet_version |
Undocumented |
Variable | charset_normalizer_version |
Undocumented |
Variable | ssl |
Undocumented |
Function | _check_cryptography |
Undocumented |
Function | check_compatibility |
Undocumented |