# requests源码精读

> requests是python实现的http库，简洁优雅，符合人类使用习惯。&#x20;

* 英文官方:  <http://python-requests.org>
* 官方中文:  <http://python-requests.org/zh_CN/latest/>
* 源码链接:  <https://github.com/psf/requests>

#### 源码分析适用人群

* 会用requests，想深入学习
* python爱好者

#### 学习该章节收获

* 精通requests源码结构，使用时理解更深刻
* 以requests为支点，串联python与http知识
* 源码精读，分析各个模块常用编程技巧
* 功能模块在实际项目中类似编程实践

{% hint style="info" %}
mobile端 左上角 \`三\` 切换目录&#x20;
{% endhint %}

![](/files/-LlGGo6-zbkga2gILMVw)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nining.website/python/spider/requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
