Requests Documentation - Read the Docs

Requests Documentation

Release 2.29.0 Kenneth Reitz

Apr 28, 2023

CONTENTS

1 Beloved Features

3

2 The User Guide

5

2.1 Installation of Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.3 Advanced Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3 The Community Guide

35

3.1 Recommended Packages and Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.2 Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3 Integrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3.4 Articles & Talks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3.5 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.6 Vulnerability Disclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.7 Release Process and Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.8 Community Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.9 Release History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4 The API Documentation / Guide

77

4.1 Developer Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

5 The Contributor Guide

101

5.1 Contributor's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

5.2 Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Python Module Index

111

Index

113

i

ii

Release v2.29.0. (Installation)

Requests Documentation, Release 2.29.0

Requests is an elegant and simple HTTP library for Python, built for human beings.

Behold, the power of Requests:

>>> r = requests.get('', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' >>> r.text '{"type":"User"...' >>> r.json() {'private_gists': 419, 'total_private_repos': 77, ...}

See similar code, sans Requests.

Requests allows you to send HTTP/1.1 requests extremely easily. There's no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, thanks to urllib3.

CONTENTS

1

Requests Documentation, Release 2.29.0

2

CONTENTS

Requests is ready for today's web. ? Keep-Alive & Connection Pooling ? International Domains and URLs ? Sessions with Cookie Persistence ? Browser-style SSL Verification ? Automatic Content Decoding ? Basic/Digest Authentication ? Elegant Key/Value Cookies ? Automatic Decompression ? Unicode Response Bodies ? HTTP(S) Proxy Support ? Multipart File Uploads ? Streaming Downloads ? Connection Timeouts ? Chunked Requests ? .netrc Support

Requests officially supports Python 3.7+, and runs great on PyPy.

CHAPTER

ONE

BELOVED FEATURES

3

Requests Documentation, Release 2.29.0

4

Chapter 1. Beloved Features

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches