
flask
laoyezha
一个即菜又挫,为生活奔波的底层劳动人民
展开
-
python3 request 发送图片两种不同实现
1.读取图片数据进行base64编码后发送客户端代码import requestsimport oshost = 'http://localhost:8888'image_path = os.path.join(os.path.dirname(__file__), 'data', 'img', 'test.jpg')def test_post_image(): method = 'post' url = os.path.join(host, 'postImage')原创 2020-06-21 13:56:49 · 2686 阅读 · 0 评论 -
python flask使用blueprint实现不同版本api模块化
文件结构如下├── index.py└── src └── api ├── __init__.py ├── v1 # 版本1 │├── __init__.py │└── routes.py └── v2 # 版本2 ├── __init__.py └── routes.p...原创 2020-06-21 13:21:12 · 952 阅读 · 1 评论