python语言系统学习(二)

1.python当中的web开发框架。

(1)web2py

见证了web2py框架的强大,new-----新建一个项目(web2py项目)--------导入web2py的包(可在线下载,也可事先放在本地)--------系统自动生成全套web框架。

回头做个小项目上传GitHub,我们的项目用不上web2py,故不做太多深入。

02python初级课程暂时省略,属于基础模块的学习。本人没那么多的时间。

03. Python RESTful API 开发

flask官网https://palletsprojects.com/p/flask/,全英文介绍,当然也可以查看flask中文官网。https://dormousehole.readthedocs.io/en/latest/

一、可以用debug模式,查看出错的地方和代码 (但是我的浏览器中缺乏高亮代码的这个功能)

二、接着介绍了谷歌的开发工具。这几项的具体功能和使用。

三、python的request模块,中文介绍参考网站:快速上手模块,可以对照着操作 http://cn.python-requests.org/zh_CN/latest/user/quickstart.html

import requests

r = requests.get('https://api.github.com/events')

print(r.text)


但是出现了报错,requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443):
Max retries exceeded with url: /events (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
现在的解决方案,参考文档。https://blog.csdn.net/ouening/article/details/89182078

 

posted on 2019-10-25 09:45  毛无语666  阅读(246)  评论(0编辑  收藏  举报

导航