![5d532403fa427e42b91a4edff1134af1.png](https://img-blog.csdnimg.cn/img_convert/5d532403fa427e42b91a4edff1134af1.png)
在python中我们可以使用requests模块来实现调用远程接口
一、安装requests模块
pip install requests
二、使用requests模块实现get方式调用远程接口
使用get方式调用远程接口主要使用了requests模块的get方法
requests.get()
get方法常见的参数有url,params和headers
url:表示远程接口的地址
params表示get参数
headers表示get传参的headers参数信息
使用requests模块实现get方式调用远程接口的简单实现如下
# -*- coding: utf-8 -*-
import request