依赖库更新,更新使用python10版本
This commit is contained in:
parent
5abaef08cc
commit
a7283b70f8
@ -49,5 +49,5 @@ ALIYUN_OSS = {
|
|||||||
获取IP地址归属地
|
获取IP地址归属地
|
||||||
文档:https://user.ip138.com/ip/doc
|
文档:https://user.ip138.com/ip/doc
|
||||||
"""
|
"""
|
||||||
IP_PARSE_ENABLE = True
|
IP_PARSE_ENABLE = False
|
||||||
IP_PARSE_TOKEN = "IP_PARSE_TOKEN"
|
IP_PARSE_TOKEN = "IP_PARSE_TOKEN"
|
||||||
|
@ -16,7 +16,6 @@ from core.crud import DalBase
|
|||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
from core.validator import vali_telephone
|
from core.validator import vali_telephone
|
||||||
from utils.file.aliyun_oss import AliyunOSS, BucketConf
|
from utils.file.aliyun_oss import AliyunOSS, BucketConf
|
||||||
from utils.file.file_manage import FileManage
|
|
||||||
from utils.aliyun_sms import AliyunSMS
|
from utils.aliyun_sms import AliyunSMS
|
||||||
from utils.excel.import_manage import ImportManage, FieldType
|
from utils.excel.import_manage import ImportManage, FieldType
|
||||||
from utils.excel.write_xlsx import WriteXlsx
|
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)
|
result = await AliyunOSS(BucketConf(**settings.ALIYUN_OSS)).upload_image("avatar", file)
|
||||||
if not result:
|
if not result:
|
||||||
raise CustomException(msg="上传失败", code=status.HTTP_ERROR)
|
raise CustomException(msg="上传失败", code=status.HTTP_ERROR)
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
"""
|
"""
|
||||||
from fastapi import Depends
|
from fastapi import Depends
|
||||||
from core.dependencies import Paging, QueryParams
|
from core.dependencies import Paging, QueryParams
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
|
|
||||||
class UserParams(QueryParams):
|
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()):
|
params: Paging = Depends()):
|
||||||
super().__init__(params)
|
super().__init__(params)
|
||||||
self.name = ("like", name)
|
self.name = ("like", name)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# sqlalchemy 关联查询:https://www.jianshu.com/p/dfad7c08c57a
|
# sqlalchemy 关联查询:https://www.jianshu.com/p/dfad7c08c57a
|
||||||
# sqlalchemy 关联查询详细:https://blog.csdn.net/u012324798/article/details/103940527
|
# sqlalchemy 关联查询详细:https://blog.csdn.net/u012324798/article/details/103940527
|
||||||
import os
|
import os
|
||||||
from typing import List, Union
|
from typing import List
|
||||||
from sqlalchemy import select, update
|
from sqlalchemy import select, update
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
from application.settings import STATIC_ROOT
|
from application.settings import STATIC_ROOT
|
||||||
@ -99,7 +99,7 @@ class SettingsTabDal(DalBase):
|
|||||||
def __init__(self, db: AsyncSession):
|
def __init__(self, db: AsyncSession):
|
||||||
super(SettingsTabDal, self).__init__(db, models.VadminSystemSettingsTab, schemas.SettingsTabSimpleOut)
|
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
|
aiohttp==3.8.3
|
||||||
aioredis
|
aioredis==2.0.1
|
||||||
aiosignal
|
aiosignal==1.3.1
|
||||||
alembic
|
alembic==1.8.1
|
||||||
alibabacloud-credentials
|
alibabacloud-credentials==0.3.0
|
||||||
alibabacloud-dysmsapi20170525
|
alibabacloud-dysmsapi20170525==2.0.22
|
||||||
alibabacloud-endpoint-util
|
alibabacloud-endpoint-util==0.0.3
|
||||||
alibabacloud-gateway-spi
|
alibabacloud-gateway-spi==0.0.1
|
||||||
alibabacloud-openapi-util
|
alibabacloud-openapi-util==0.2.0
|
||||||
alibabacloud-tea
|
alibabacloud-tea==0.3.0
|
||||||
alibabacloud-tea-openapi
|
alibabacloud-tea-openapi==0.3.6
|
||||||
alibabacloud-tea-util
|
alibabacloud-tea-util==0.3.8
|
||||||
alibabacloud-tea-xml
|
alibabacloud-tea-xml==0.0.2
|
||||||
aliyun-python-sdk-core
|
aliyun-python-sdk-core==2.13.36
|
||||||
aliyun-python-sdk-kms
|
aliyun-python-sdk-kms==2.16.0
|
||||||
anyio
|
anyio==3.6.2
|
||||||
asgiref
|
asgiref==3.5.2
|
||||||
async-timeout
|
async-timeout==4.0.2
|
||||||
asyncmy
|
asyncmy==0.2.5
|
||||||
attrs
|
attrs==22.1.0
|
||||||
bcrypt
|
bcrypt==4.0.1
|
||||||
certifi
|
certifi==2022.9.24
|
||||||
cffi
|
cffi==1.15.1
|
||||||
charset-normalizer
|
charset-normalizer==2.1.1
|
||||||
click
|
click==8.1.3
|
||||||
colorama
|
colorama==0.4.6
|
||||||
crcmod
|
crcmod==1.7
|
||||||
cryptography
|
cryptography==38.0.3
|
||||||
dnspython
|
dnspython==2.2.1
|
||||||
ecdsa
|
ecdsa==0.18.0
|
||||||
et-xmlfile
|
et-xmlfile==1.1.0
|
||||||
fastapi
|
fastapi==0.87.0
|
||||||
frozenlist
|
frozenlist==1.3.3
|
||||||
greenlet
|
greenlet==2.0.1
|
||||||
gunicorn
|
gunicorn==20.1.0
|
||||||
h11
|
h11==0.14.0
|
||||||
httptools
|
httptools==0.5.0
|
||||||
idna
|
idna==3.4
|
||||||
importlib-metadata
|
importlib-metadata==5.0.0
|
||||||
importlib-resources
|
importlib-resources==5.10.0
|
||||||
jmespath
|
jmespath==0.10.0
|
||||||
loguru
|
loguru==0.6.0
|
||||||
Mako
|
Mako==1.2.4
|
||||||
MarkupSafe
|
MarkupSafe==2.1.1
|
||||||
motor
|
motor==3.1.1
|
||||||
multidict
|
multidict==6.0.2
|
||||||
openpyxl
|
openpyxl==3.0.10
|
||||||
orjson
|
orjson==3.8.2
|
||||||
oss2
|
oss2==2.16.0
|
||||||
passlib
|
passlib==1.7.4
|
||||||
Pillow
|
Pillow==9.3.0
|
||||||
pyasn1
|
pyasn1==0.4.8
|
||||||
pycparser
|
pycparser==2.21
|
||||||
pycryptodome
|
pycryptodome==3.15.0
|
||||||
pydantic
|
pydantic==1.10.2
|
||||||
pymongo
|
pymongo==4.3.3
|
||||||
PyMySQL
|
PyMySQL==1.0.2
|
||||||
python-dotenv
|
python-dotenv==0.21.0
|
||||||
python-jose
|
python-jose==3.3.0
|
||||||
python-multipart
|
python-multipart==0.0.5
|
||||||
PyYAML
|
PyYAML==6.0
|
||||||
requests
|
requests==2.28.1
|
||||||
rsa
|
rsa==4.9
|
||||||
six
|
six==1.16.0
|
||||||
sniffio
|
sniffio==1.3.0
|
||||||
SQLAlchemy
|
SQLAlchemy==1.4.44
|
||||||
SQLAlchemy-Utils
|
SQLAlchemy-Utils==0.38.3
|
||||||
SSIM-PIL
|
SSIM-PIL==1.0.14
|
||||||
starlette
|
starlette==0.21.0
|
||||||
typing-extensions
|
typer==0.7.0
|
||||||
ua-parser
|
typing-extensions==4.4.0
|
||||||
urllib3
|
ua-parser==0.16.1
|
||||||
user-agents
|
urllib3==1.26.12
|
||||||
uvicorn
|
user-agents==2.2.0
|
||||||
watchgod
|
uvicorn==0.20.0
|
||||||
websockets
|
watchgod==0.8.2
|
||||||
win32-setctime
|
websockets==10.4
|
||||||
XlsxWriter
|
win32-setctime==1.1.0
|
||||||
yarl
|
XlsxWriter==3.0.3
|
||||||
zipp
|
yarl==1.8.1
|
||||||
zope.event
|
zipp==3.10.0
|
||||||
zope.interface
|
zope.event==4.5.0
|
||||||
typer
|
zope.interface==5.5.2
|
@ -12,7 +12,6 @@ import uuid
|
|||||||
from fastapi import UploadFile
|
from fastapi import UploadFile
|
||||||
from core.exception import CustomException
|
from core.exception import CustomException
|
||||||
from utils import status
|
from utils import status
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
|
|
||||||
class FileBase:
|
class FileBase:
|
||||||
@ -52,7 +51,7 @@ class FileBase:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@classmethod
|
@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 datetime
|
||||||
import re
|
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种组合,请重新输入。'
|
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