依赖库更新,更新使用python10版本
This commit is contained in:
parent
5abaef08cc
commit
a7283b70f8
@ -49,5 +49,5 @@ ALIYUN_OSS = {
|
||||
获取IP地址归属地
|
||||
文档:https://user.ip138.com/ip/doc
|
||||
"""
|
||||
IP_PARSE_ENABLE = True
|
||||
IP_PARSE_ENABLE = False
|
||||
IP_PARSE_TOKEN = "IP_PARSE_TOKEN"
|
||||
|
@ -16,7 +16,6 @@ from core.crud import DalBase
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from core.validator import vali_telephone
|
||||
from utils.file.aliyun_oss import AliyunOSS, BucketConf
|
||||
from utils.file.file_manage import FileManage
|
||||
from utils.aliyun_sms import AliyunSMS
|
||||
from utils.excel.import_manage import ImportManage, FieldType
|
||||
from utils.excel.write_xlsx import WriteXlsx
|
||||
@ -213,9 +212,6 @@ class UserDal(DalBase):
|
||||
"""
|
||||
更新当前用户头像
|
||||
"""
|
||||
test = await FileManage.save_tmp_file(file)
|
||||
print(test)
|
||||
await file.seek(0)
|
||||
result = await AliyunOSS(BucketConf(**settings.ALIYUN_OSS)).upload_image("avatar", file)
|
||||
if not result:
|
||||
raise CustomException(msg="上传失败", code=status.HTTP_ERROR)
|
||||
|
@ -11,7 +11,6 @@
|
||||
"""
|
||||
from fastapi import Depends
|
||||
from core.dependencies import Paging, QueryParams
|
||||
from typing import Union
|
||||
|
||||
|
||||
class UserParams(QueryParams):
|
||||
@ -19,7 +18,7 @@ class UserParams(QueryParams):
|
||||
列表分页
|
||||
"""
|
||||
|
||||
def __init__(self, name: str = None, telephone: str = None, is_active: Union[bool, str] = None,
|
||||
def __init__(self, name: str = None, telephone: str = None, is_active: bool | str = None,
|
||||
params: Paging = Depends()):
|
||||
super().__init__(params)
|
||||
self.name = ("like", name)
|
||||
|
@ -10,7 +10,7 @@
|
||||
# sqlalchemy 关联查询:https://www.jianshu.com/p/dfad7c08c57a
|
||||
# sqlalchemy 关联查询详细:https://blog.csdn.net/u012324798/article/details/103940527
|
||||
import os
|
||||
from typing import List, Union
|
||||
from typing import List
|
||||
from sqlalchemy import select, update
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from application.settings import STATIC_ROOT
|
||||
@ -99,7 +99,7 @@ class SettingsTabDal(DalBase):
|
||||
def __init__(self, db: AsyncSession):
|
||||
super(SettingsTabDal, self).__init__(db, models.VadminSystemSettingsTab, schemas.SettingsTabSimpleOut)
|
||||
|
||||
async def get_classify_tab_values(self, classify: List[str], hidden: Union[bool, None] = False):
|
||||
async def get_classify_tab_values(self, classify: List[str], hidden: bool | None = False):
|
||||
"""
|
||||
获取系统配置分类下的所有显示标签信息
|
||||
"""
|
||||
|
@ -1,83 +1,83 @@
|
||||
aiohttp
|
||||
aioredis
|
||||
aiosignal
|
||||
alembic
|
||||
alibabacloud-credentials
|
||||
alibabacloud-dysmsapi20170525
|
||||
alibabacloud-endpoint-util
|
||||
alibabacloud-gateway-spi
|
||||
alibabacloud-openapi-util
|
||||
alibabacloud-tea
|
||||
alibabacloud-tea-openapi
|
||||
alibabacloud-tea-util
|
||||
alibabacloud-tea-xml
|
||||
aliyun-python-sdk-core
|
||||
aliyun-python-sdk-kms
|
||||
anyio
|
||||
asgiref
|
||||
async-timeout
|
||||
asyncmy
|
||||
attrs
|
||||
bcrypt
|
||||
certifi
|
||||
cffi
|
||||
charset-normalizer
|
||||
click
|
||||
colorama
|
||||
crcmod
|
||||
cryptography
|
||||
dnspython
|
||||
ecdsa
|
||||
et-xmlfile
|
||||
fastapi
|
||||
frozenlist
|
||||
greenlet
|
||||
gunicorn
|
||||
h11
|
||||
httptools
|
||||
idna
|
||||
importlib-metadata
|
||||
importlib-resources
|
||||
jmespath
|
||||
loguru
|
||||
Mako
|
||||
MarkupSafe
|
||||
motor
|
||||
multidict
|
||||
openpyxl
|
||||
orjson
|
||||
oss2
|
||||
passlib
|
||||
Pillow
|
||||
pyasn1
|
||||
pycparser
|
||||
pycryptodome
|
||||
pydantic
|
||||
pymongo
|
||||
PyMySQL
|
||||
python-dotenv
|
||||
python-jose
|
||||
python-multipart
|
||||
PyYAML
|
||||
requests
|
||||
rsa
|
||||
six
|
||||
sniffio
|
||||
SQLAlchemy
|
||||
SQLAlchemy-Utils
|
||||
SSIM-PIL
|
||||
starlette
|
||||
typing-extensions
|
||||
ua-parser
|
||||
urllib3
|
||||
user-agents
|
||||
uvicorn
|
||||
watchgod
|
||||
websockets
|
||||
win32-setctime
|
||||
XlsxWriter
|
||||
yarl
|
||||
zipp
|
||||
zope.event
|
||||
zope.interface
|
||||
typer
|
||||
aiohttp==3.8.3
|
||||
aioredis==2.0.1
|
||||
aiosignal==1.3.1
|
||||
alembic==1.8.1
|
||||
alibabacloud-credentials==0.3.0
|
||||
alibabacloud-dysmsapi20170525==2.0.22
|
||||
alibabacloud-endpoint-util==0.0.3
|
||||
alibabacloud-gateway-spi==0.0.1
|
||||
alibabacloud-openapi-util==0.2.0
|
||||
alibabacloud-tea==0.3.0
|
||||
alibabacloud-tea-openapi==0.3.6
|
||||
alibabacloud-tea-util==0.3.8
|
||||
alibabacloud-tea-xml==0.0.2
|
||||
aliyun-python-sdk-core==2.13.36
|
||||
aliyun-python-sdk-kms==2.16.0
|
||||
anyio==3.6.2
|
||||
asgiref==3.5.2
|
||||
async-timeout==4.0.2
|
||||
asyncmy==0.2.5
|
||||
attrs==22.1.0
|
||||
bcrypt==4.0.1
|
||||
certifi==2022.9.24
|
||||
cffi==1.15.1
|
||||
charset-normalizer==2.1.1
|
||||
click==8.1.3
|
||||
colorama==0.4.6
|
||||
crcmod==1.7
|
||||
cryptography==38.0.3
|
||||
dnspython==2.2.1
|
||||
ecdsa==0.18.0
|
||||
et-xmlfile==1.1.0
|
||||
fastapi==0.87.0
|
||||
frozenlist==1.3.3
|
||||
greenlet==2.0.1
|
||||
gunicorn==20.1.0
|
||||
h11==0.14.0
|
||||
httptools==0.5.0
|
||||
idna==3.4
|
||||
importlib-metadata==5.0.0
|
||||
importlib-resources==5.10.0
|
||||
jmespath==0.10.0
|
||||
loguru==0.6.0
|
||||
Mako==1.2.4
|
||||
MarkupSafe==2.1.1
|
||||
motor==3.1.1
|
||||
multidict==6.0.2
|
||||
openpyxl==3.0.10
|
||||
orjson==3.8.2
|
||||
oss2==2.16.0
|
||||
passlib==1.7.4
|
||||
Pillow==9.3.0
|
||||
pyasn1==0.4.8
|
||||
pycparser==2.21
|
||||
pycryptodome==3.15.0
|
||||
pydantic==1.10.2
|
||||
pymongo==4.3.3
|
||||
PyMySQL==1.0.2
|
||||
python-dotenv==0.21.0
|
||||
python-jose==3.3.0
|
||||
python-multipart==0.0.5
|
||||
PyYAML==6.0
|
||||
requests==2.28.1
|
||||
rsa==4.9
|
||||
six==1.16.0
|
||||
sniffio==1.3.0
|
||||
SQLAlchemy==1.4.44
|
||||
SQLAlchemy-Utils==0.38.3
|
||||
SSIM-PIL==1.0.14
|
||||
starlette==0.21.0
|
||||
typer==0.7.0
|
||||
typing-extensions==4.4.0
|
||||
ua-parser==0.16.1
|
||||
urllib3==1.26.12
|
||||
user-agents==2.2.0
|
||||
uvicorn==0.20.0
|
||||
watchgod==0.8.2
|
||||
websockets==10.4
|
||||
win32-setctime==1.1.0
|
||||
XlsxWriter==3.0.3
|
||||
yarl==1.8.1
|
||||
zipp==3.10.0
|
||||
zope.event==4.5.0
|
||||
zope.interface==5.5.2
|
@ -12,7 +12,6 @@ import uuid
|
||||
from fastapi import UploadFile
|
||||
from core.exception import CustomException
|
||||
from utils import status
|
||||
from typing import Union
|
||||
|
||||
|
||||
class FileBase:
|
||||
@ -52,7 +51,7 @@ class FileBase:
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def get_file_type(cls, content_type: str) -> Union[str, None]:
|
||||
def get_file_type(cls, content_type: str) -> str | None:
|
||||
"""
|
||||
获取文件类型
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
import datetime
|
||||
import re
|
||||
from typing import List, Union
|
||||
from typing import List
|
||||
|
||||
|
||||
def test_password(password: str) -> Union[str, bool]:
|
||||
def test_password(password: str) -> str | bool:
|
||||
"""
|
||||
检测密码强度
|
||||
"""
|
||||
@ -32,7 +32,7 @@ def test_password(password: str) -> Union[str, bool]:
|
||||
return '至少含数字/字母/字符2种组合,请重新输入。'
|
||||
|
||||
|
||||
def list_dict_find(options: List[dict], key: str, value: any) -> Union[dict, None]:
|
||||
def list_dict_find(options: List[dict], key: str, value: any) -> dict | None:
|
||||
"""
|
||||
字典列表查找
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user