-
from typing import List
def process_time(item: List[str]):
pass
查看全部 -
包的版本问题
兼容性问题
查看全部 -
安装依赖包,注意关注版本
查看全部 -
使用pydantic模型来进行put和post的数据请求
查看全部 -
使用Optional来让查询参数可选
查看全部 -
两个斜杠之间的参数叫做【路径参数】
?q=后面的参数叫做【查询参数】
直接定义在函数的参数里面
查看全部 -
Python的类型提示type hints
Pydantic是一个基于Python类型提示来定义数据验证,序列化和
文档(使用SON模式)库
Starlette是一种轻量级的ASGl框架/工具包,是构建高性能
Asyncio服务的理想选择
查看全部 -
语言特点:
1、性能优越;
2、开发效率高;
3、减少认为bug50%以上;
查看全部 -
版本问题,与教师版本最好保持一致
查看全部 -
需要注意框架的版本与包的版本是否一致,有可能版本不一致导致BUG产生
查看全部 -
pycharm 中使用anoconda python 编辑器,但是python console直接显示error exit 1:
import _ssl DLL load fail error
解决方法:
From anaconda3\Library\bin copy below files and paste them in anaconda3/DLLs:
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dllhttps://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error
查看全部 -
pycharm 直接使用new project 创建project,使用virtualenv方式 指定anoconda的python解释器作为project的python解释器。
在使用pip install的时候,出现SSL错误:
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/aiofiles/
Could not fetch URL https://pypi.org/simple/aiofiles/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/aiofiles/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement aiofiles==0.6.0 (from versions: none)
ERROR: No matching distribution found for aiofiles==0.6.0。
原因是在windows powershell中使用anoconda的pip命令,需要在环境变量中添加如下三项:
D:\Anaconda3
D:\Anaconda3\Scripts
D:\Anaconda3\Library\bin(https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in)
powershell中添加环境变量方法:
$env:Path += ";D:\Anaconda3"
(https://stackoverflow.com/questions/714877/setting-windows-powershell-environment-variables)
查看环境变量方法:dir env:
添加后一切正常。
查看全部 -
代码没问题,但是运行报错了
框架有包的版本兼容问题
查看全部
举报