| 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 least |
| 4 |
contain the root `toctree` directive. |
| 5 |
|
| 6 |
Requests: HTTP for Humans™ |
| 7 |
========================== |
| 8 |
|
| 9 |
Release v\ |version|. (:ref:`Installation <install>`) |
| 10 |
|
| 11 |
|
| 12 |
.. image:: https://img.shields.io/pypi/v/requests.svg?maxAge=86400 |
| 13 |
:target: https://pypi.org/project/requests/ |
| 14 |
:alt: PyPI Version Badge |
| 15 |
|
| 16 |
.. image:: https://img.shields.io/pypi/pyversions/requests.svg |
| 17 |
:target: https://pypi.org/project/requests/ |
| 18 |
:alt: Supported Versions Badge |
| 19 |
|
| 20 |
.. image:: https://static.pepy.tech/badge/requests/month |
| 21 |
:target: https://pepy.tech/project/requests |
| 22 |
:alt: Downloads Per Month Badge |
| 23 |
|
| 24 |
.. image:: https://img.shields.io/github/contributors/psf/requests.svg |
| 25 |
:target: https://github.com/psf/requests/graphs/contributors |
| 26 |
:alt: Contributors Badge |
| 27 |
|
| 28 |
.. image:: https://readthedocs.org/projects/requests/badge/?version=latest |
| 29 |
:target: https://requests.readthedocs.io |
| 30 |
:alt: Documentation Badge |
| 31 |
|
| 32 |
**Requests** is an elegant and simple HTTP library for Python, built for human beings. |
| 33 |
|
| 34 |
------------------- |
| 35 |
|
| 36 |
**Behold, the power of Requests**:: |
| 37 |
|
| 38 |
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) |
| 39 |
>>> r.status_code |
| 40 |
200 |
| 41 |
>>> r.headers['content-type'] |
| 42 |
'application/json; charset=utf8' |
| 43 |
>>> r.encoding |
| 44 |
'utf-8' |
| 45 |
>>> r.text |
| 46 |
'{"type":"User"...' |
| 47 |
>>> r.json() |
| 48 |
{'private_gists': 419, 'total_private_repos': 77, ...} |
| 49 |
|
| 50 |
See `similar code, sans Requests <https://gist.github.com/973705>`_. |
| 51 |
|
| 52 |
|
| 53 |
**Requests** allows you to send HTTP/1.1 requests extremely easily. |
| 54 |
There's no need to manually add query strings to your |
| 55 |
URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling |
| 56 |
are 100% automatic, thanks to `urllib3 <https://github.com/urllib3/urllib3>`_. |
| 57 |
|
| 58 |
Beloved Features |
| 59 |
---------------- |
| 60 |
|
| 61 |
Requests is ready for today's web. |
| 62 |
|
| 63 |
- Keep-Alive & Connection Pooling |
| 64 |
- International Domains and URLs |
| 65 |
- Sessions with Cookie Persistence |
| 66 |
- Browser-style SSL Verification |
| 67 |
- Automatic Content Decoding |
| 68 |
- Basic/Digest Authentication |
| 69 |
- Elegant Key/Value Cookies |
| 70 |
- Automatic Decompression |
| 71 |
- Unicode Response Bodies |
| 72 |
- HTTP(S) Proxy Support |
| 73 |
- Multipart File Uploads |
| 74 |
- Streaming Downloads |
| 75 |
- Connection Timeouts |
| 76 |
- Chunked Requests |
| 77 |
- ``.netrc`` Support |
| 78 |
|
| 79 |
Requests officially supports Python 3.10+, and runs great on PyPy. |
| 80 |
|
| 81 |
|
| 82 |
The User Guide |
| 83 |
-------------- |
| 84 |
|
| 85 |
This part of the documentation, which is mostly prose, begins with some |
| 86 |
background information about Requests, then focuses on step-by-step |
| 87 |
instructions for getting the most out of Requests. |
| 88 |
|
| 89 |
.. toctree:: |
| 90 |
:maxdepth: 2 |
| 91 |
|
| 92 |
user/install |
| 93 |
user/quickstart |
| 94 |
user/advanced |
| 95 |
user/authentication |
| 96 |
|
| 97 |
|
| 98 |
The Community Guide |
| 99 |
------------------- |
| 100 |
|
| 101 |
This part of the documentation, which is mostly prose, details the |
| 102 |
Requests ecosystem and community. |
| 103 |
|
| 104 |
.. toctree:: |
| 105 |
:maxdepth: 2 |
| 106 |
|
| 107 |
community/recommended |
| 108 |
community/faq |
| 109 |
community/out-there |
| 110 |
community/support |
| 111 |
community/vulnerabilities |
| 112 |
community/release-process |
| 113 |
|
| 114 |
.. toctree:: |
| 115 |
:maxdepth: 1 |
| 116 |
|
| 117 |
community/updates |
| 118 |
|
| 119 |
The API Documentation / Guide |
| 120 |
----------------------------- |
| 121 |
|
| 122 |
If you are looking for information on a specific function, class, or method, |
| 123 |
this part of the documentation is for you. |
| 124 |
|
| 125 |
.. toctree:: |
| 126 |
:maxdepth: 2 |
| 127 |
|
| 128 |
api |
| 129 |
|
| 130 |
|
| 131 |
The Contributor Guide |
| 132 |
--------------------- |
| 133 |
|
| 134 |
If you want to contribute to the project, this part of the documentation is for |
| 135 |
you. |
| 136 |
|
| 137 |
.. toctree:: |
| 138 |
:maxdepth: 3 |
| 139 |
|
| 140 |
dev/contributing |
| 141 |
dev/authors |
| 142 |
|
| 143 |
There are no more guides. You are now guideless. |
| 144 |
Good luck. |