diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 952e0e7..0bd0fc8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: shell: bash - name : Install dependance - run: poetry install --without dev + run: poetry install shell: bash - name : Build dist diff --git a/.gitignore b/.gitignore index 929395b..1581888 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ .git .github dist +sample.py dynamicadaptor/__pycache__ \ No newline at end of file diff --git a/dynamicadaptor/AddonCard.py b/dynamicadaptor/AddonCard.py index bf8c9e0..d59ac01 100644 --- a/dynamicadaptor/AddonCard.py +++ b/dynamicadaptor/AddonCard.py @@ -1,5 +1,4 @@ -from enum import Enum -from typing import List, Optional, Union +from typing import List, Optional from pydantic import BaseModel @@ -9,7 +8,6 @@ class GoodsItem(BaseModel): price: str name: str - class Goods(BaseModel): head_text: str @@ -25,16 +23,16 @@ class Reserve(BaseModel): title: str desc1: ReserveDesc desc2: ReserveDesc - desc3: Optional[ReserveDesc] + desc3: Optional[ReserveDesc] = None # Common class Common(BaseModel): sub_type: str - head_text: Optional[str] + head_text: Optional[str] = None cover: str desc1: str - desc2: Optional[str] + desc2: Optional[str] = None title: str @@ -44,29 +42,32 @@ class Ugc(BaseModel): title: str desc_second: str duration: str - head_text: Optional[str] + head_text: Optional[str] = None # Vote class Vote(BaseModel): - desc: Optional[str] - join_num: Optional[int] - + desc: Optional[str] = None + join_num: Optional[int] = None class UpowerLotteryBtnJst(BaseModel): - text:str + text: str + + class UpowerLotteryDesc(BaseModel): - text:str + text: str + class UpowerLotteryBtn(BaseModel): - jump_style:Optional[UpowerLotteryBtnJst] - + jump_style: Optional[UpowerLotteryBtnJst] = None + class UpowerLottery(BaseModel): - title:str - desc:UpowerLotteryDesc - button:UpowerLotteryBtn + title: str + desc: UpowerLotteryDesc + button: UpowerLotteryBtn + # class AdditionalDetail(Enum): # """ @@ -86,14 +87,15 @@ class UpowerLottery(BaseModel): # reserve: Reserve # common: Common # ugc: Ugc -# vote: Vote -# upower_lottery:UpowerLottery +# vote: Vote +# upower_lottery:UpowerLottery + class Additional(BaseModel): type: str - goods: Optional[Goods] - reserve: Optional[Reserve] - common: Optional[Common] - ugc: Optional[Ugc] - vote: Optional[Vote] - upower_lottery:Optional[UpowerLottery] + goods: Optional[Goods] = None + reserve: Optional[Reserve] = None + common: Optional[Common] = None + ugc: Optional[Ugc] = None + vote: Optional[Vote] = None + upower_lottery: Optional[UpowerLottery] = None diff --git a/dynamicadaptor/Content.py b/dynamicadaptor/Content.py index 948214d..82d873d 100644 --- a/dynamicadaptor/Content.py +++ b/dynamicadaptor/Content.py @@ -3,19 +3,16 @@ class Emoji(BaseModel): - icon_url: Optional[str] - text: Optional[str] - type: Union[int, str, None] - - - + icon_url: Optional[str] = None + text: Optional[str] = None + type: Union[int, str, None] = None class RichTextDetail(BaseModel): type: str text: str - orig_text: Optional[str] - emoji: Optional[Emoji] + orig_text: Optional[str] = None + emoji: Optional[Emoji] = None # RICH_TEXT_NODE_TYPE_TEXT 文本 # RICH_TEXT_NODE_TYPE_AT At # RICH_TEXT_NODE_TYPE_VOTE 投票 @@ -32,6 +29,6 @@ class Topic(BaseModel): class Text(BaseModel): - text: Optional[str] - topic: Optional[Topic] - rich_text_nodes: Optional[List[RichTextDetail]] + text: Optional[str] = None + topic: Optional[Topic] = None + rich_text_nodes: Optional[List[RichTextDetail]] = None diff --git a/dynamicadaptor/DynamicConversion.py b/dynamicadaptor/DynamicConversion.py index 6800bc5..8eda27b 100644 --- a/dynamicadaptor/DynamicConversion.py +++ b/dynamicadaptor/DynamicConversion.py @@ -4,7 +4,10 @@ from .Repost import Forward from loguru import logger -async def formate_message(message_type: str, message: dict) -> Union[None, RenderMessage]: + +async def formate_message( + message_type: str, message: dict +) -> Union[None, RenderMessage]: """将grpc动态或web端动态转换成渲染数据类型 Args: @@ -37,11 +40,17 @@ async def grpc_formate(message: dict) -> Union[RenderMessage, None]: """ message_type = message["cardType"] message_id = message["extend"]["dynIdStr"] - header = await get_grpc_header(message["modules"][0]["moduleAuthor"]) - + for i in message["modules"]: + if i["moduleType"] == "module_author": + header = await get_grpc_header(i["moduleAuthor"]) + break + # header = await get_grpc_header(message["modules"][0]["moduleAuthor"]) + text = await get_grpc_text(message) + # print(text) major = await get_grpc_major(message) additional = await get_grpc_additional(message) + # print(additional) forward = await get_grpc_forward(message) render_message = RenderMessage( message_type=message_type, @@ -110,12 +119,12 @@ async def get_grpc_forward_header(message: dict) -> dict: try: author = i["moduleAuthorForward"] if "uid" in author: - return {"name": author["title"][0]["text"],"mid": author["uid"]} + return {"name": author["title"][0]["text"], "mid": author["uid"]} else: - return {"name": author["title"][0]["text"],"mid": 0} + return {"name": author["title"][0]["text"], "mid": 0} except Exception as e: logger.exception(e) - + return None async def get_grpc_text(message: dict) -> Union[dict, None]: @@ -128,16 +137,17 @@ async def get_grpc_text(message: dict) -> Union[dict, None]: """ text = {} - rich_type_dict = {"desc_type_text": "RICH_TEXT_NODE_TYPE_TEXT", - "desc_type_aite": "RICH_TEXT_NODE_TYPE_AT", - "desc_type_vote": "RICH_TEXT_NODE_TYPE_VOTE", - "desc_type_topic": "RICH_TEXT_NODE_TYPE_TOPIC", - "desc_type_bv": "RICH_TEXT_NODE_TYPE_BV", - "desc_type_web": "RICH_TEXT_NODE_TYPE_WEB", - "desc_type_lottery": "RICH_TEXT_NODE_TYPE_LOTTERY", - "desc_type_goods": "RICH_TEXT_NODE_TYPE_GOODS", - "desc_type_emoji": "RICH_TEXT_NODE_TYPE_EMOJI" - } + rich_type_dict = { + "desc_type_text": "RICH_TEXT_NODE_TYPE_TEXT", + "desc_type_aite": "RICH_TEXT_NODE_TYPE_AT", + "desc_type_vote": "RICH_TEXT_NODE_TYPE_VOTE", + "desc_type_topic": "RICH_TEXT_NODE_TYPE_TOPIC", + "desc_type_bv": "RICH_TEXT_NODE_TYPE_BV", + "desc_type_web": "RICH_TEXT_NODE_TYPE_WEB", + "desc_type_lottery": "RICH_TEXT_NODE_TYPE_LOTTERY", + "desc_type_goods": "RICH_TEXT_NODE_TYPE_GOODS", + "desc_type_emoji": "RICH_TEXT_NODE_TYPE_EMOJI", + } for i in message["modules"]: try: if i["moduleType"] == "module_topic": @@ -149,9 +159,25 @@ async def get_grpc_text(message: dict) -> Union[dict, None]: plain_text = i["moduleDesc"]["text"] rich_text_nodes = [] for j in i["moduleDesc"]["desc"]: - temp = {"type": rich_type_dict[j["type"]], "text": j["text"], "orig_text": j["origText"]} + temp = { + "type": rich_type_dict[j["type"]], + "text": j["text"], + "orig_text": j["origText"], + } try: - temp["emoji"] = {"icon_url": j["uri"], "type": j["emojiType"], "text": j["text"]} + # print(j) + if "emojiType" in j: + temp["emoji"] = { + "icon_url": j["uri"], + "type": j["emojiType"], + "text": j["text"], + } + else: + temp["emoji"] = { + "icon_url": j["uri"], + "type": j["type"], + "text": j["text"], + } except Exception as e: pass rich_text_nodes.append(temp) @@ -176,100 +202,158 @@ async def get_grpc_major(message: dict) -> Union[dict, None]: Union[dict, None]: 符合要求的信息 """ for i in message["modules"]: - # try: - # if i["moduleDynamic"]["type"] == "mdl_dyn_forward": - # print(i["moduleDynamic"]) - # continue - # except Exception as e: - # pass if i["moduleType"] == "module_dynamic": - # print(i["moduleDynamic"]["type"]) + # if i["moduleType"] in {"module_dynamic","module_item_null"}: + # if i["moduleType"] == "module_item_null" : + # return {"type": "MAJOR_TYPE_NONE", "none": {"tips":i["moduleItemNull"]["text"]}} module_dynamic = i["moduleDynamic"] - if "dynDraw" in module_dynamic: + if "dynDraw" in module_dynamic: try: - return {"type": "MAJOR_TYPE_DRAW", "draw": module_dynamic["dynDraw"]} + return { + "type": "MAJOR_TYPE_DRAW", + "draw": module_dynamic["dynDraw"], + } except Exception as e: logger.exception("error") elif "dynForward" in module_dynamic: continue elif "dynArchive" in module_dynamic: try: - module_dynamic["dynArchive"]["duration_text"] = module_dynamic["dynArchive"]["coverLeftText1"] + module_dynamic["dynArchive"]["duration_text"] = module_dynamic[ + "dynArchive" + ]["coverLeftText1"] if "badge" in module_dynamic["dynArchive"]: badge = { - "text":module_dynamic["dynArchive"]["badge"][0]["text"], - "color":module_dynamic["dynArchive"]["badge"][0]["textColor"], - "bg_color": module_dynamic["dynArchive"]["badge"][0]["bgColor"] + "text": module_dynamic["dynArchive"]["badge"][0]["text"], + "color": module_dynamic["dynArchive"]["badge"][0][ + "textColor" + ], + "bg_color": module_dynamic["dynArchive"]["badge"][0][ + "bgColor" + ], } module_dynamic["dynArchive"]["badge"] = badge - return {"type": "MAJOR_TYPE_ARCHIVE", "archive": module_dynamic["dynArchive"]} + return { + "type": "MAJOR_TYPE_ARCHIVE", + "archive": module_dynamic["dynArchive"], + } except Exception as e: logger.exception("error") - elif "dynLiveRcmd" in module_dynamic: + elif "dynLiveRcmd" in module_dynamic: try: - return {"type": "MAJOR_TYPE_LIVE_RCMD", "live_rcmd": module_dynamic["dynLiveRcmd"]} + return { + "type": "MAJOR_TYPE_LIVE_RCMD", + "live_rcmd": module_dynamic["dynLiveRcmd"], + } except Exception as e: logger.exception("error") elif "dynArticle" in module_dynamic: try: - module_dynamic["dynArticle"]["cover"] = module_dynamic["dynArticle"]["covers"] - return {"type": "MAJOR_TYPE_ARTICLE", "article": module_dynamic["dynArticle"]} + module_dynamic["dynArticle"]["cover"] = module_dynamic[ + "dynArticle" + ]["covers"] + return { + "type": "MAJOR_TYPE_ARTICLE", + "article": module_dynamic["dynArticle"], + } except Exception as e: logger.exception("error") elif "dynCommon" in module_dynamic: try: - module_dynamic["dynCommon"]["biz_type"] = module_dynamic["dynCommon"]["bizType"] - module_dynamic["dynCommon"]["url"] = module_dynamic["dynCommon"]["uri"] + module_dynamic["dynCommon"]["biz_type"] = module_dynamic[ + "dynCommon" + ]["bizType"] + module_dynamic["dynCommon"]["url"] = module_dynamic["dynCommon"][ + "uri" + ] if "badge" in module_dynamic["dynCommon"]: - badge = {"text":module_dynamic["dynCommon"]["badge"][0]["text"], - "color":module_dynamic["dynCommon"]["badge"][0]["textColor"], - "bg_color":module_dynamic["dynCommon"]["badge"][0]["bgColor"]} + badge = { + "text": module_dynamic["dynCommon"]["badge"][0]["text"], + "color": module_dynamic["dynCommon"]["badge"][0][ + "textColor" + ], + "bg_color": module_dynamic["dynCommon"]["badge"][0][ + "bgColor" + ], + } module_dynamic["dynCommon"]["badge"] = badge - return {"type": "MAJOR_TYPE_COMMON", "common": module_dynamic["dynCommon"]} + return { + "type": "MAJOR_TYPE_COMMON", + "common": module_dynamic["dynCommon"], + } except Exception as e: logger.exception("error") elif "dynMusic" in module_dynamic: try: - module_dynamic["dynMusic"]["label"] = module_dynamic["dynMusic"]["label1"] - return {"type": "MAJOR_TYPE_MUSIC", "music": module_dynamic["dynMusic"]} + module_dynamic["dynMusic"]["label"] = module_dynamic["dynMusic"][ + "label1" + ] + return { + "type": "MAJOR_TYPE_MUSIC", + "music": module_dynamic["dynMusic"], + } except Exception as e: logger.exception("error") elif "dynPgc" in module_dynamic: try: module_dynamic["dynPgc"]["badge"] = { "text": module_dynamic["dynPgc"]["badgeCategory"][1]["text"], - "color": module_dynamic["dynPgc"]["badgeCategory"][1]["textColor"], - "bg_color": module_dynamic["dynPgc"]["badgeCategory"][1]["bgColor"]} + "color": module_dynamic["dynPgc"]["badgeCategory"][1][ + "textColor" + ], + "bg_color": module_dynamic["dynPgc"]["badgeCategory"][1][ + "bgColor" + ], + } - module_dynamic["dynPgc"]["stat"] = {"danmaku": module_dynamic["dynPgc"]["coverLeftText3"], - "play": module_dynamic["dynPgc"]["coverLeftText2"]} + module_dynamic["dynPgc"]["stat"] = { + "danmaku": module_dynamic["dynPgc"]["coverLeftText3"], + "play": module_dynamic["dynPgc"]["coverLeftText2"], + } return {"type": "MAJOR_TYPE_PGC", "pgc": module_dynamic["dynPgc"]} except Exception as e: logger.exception("error") elif "dynMedialist" in module_dynamic: try: - module_dynamic["dynMedialist"]["sub_title"] = module_dynamic["dynMedialist"]["subTitle"] - module_dynamic["dynMedialist"]["badge"]["color"] = '#FFFFFF' - module_dynamic["dynMedialist"]["badge"]["bg_color"] = '#FB7299' - return {"type": "MAJOR_TYPE_MEDIALIST", "medialist": module_dynamic["dynMedialist"]} + module_dynamic["dynMedialist"]["sub_title"] = module_dynamic[ + "dynMedialist" + ]["subTitle"] + module_dynamic["dynMedialist"]["badge"]["color"] = "#FFFFFF" + module_dynamic["dynMedialist"]["badge"]["bg_color"] = "#FB7299" + return { + "type": "MAJOR_TYPE_MEDIALIST", + "medialist": module_dynamic["dynMedialist"], + } except Exception as e: logger.exception("error") elif "dynCourSeason" in module_dynamic: try: - module_dynamic["dynCourSeason"]["sub_title"] = module_dynamic["dynCourSeason"]["text1"] - module_dynamic["dynCourSeason"]["badge"]["color"] = '#ffffff' - module_dynamic["dynCourSeason"]["badge"]["bg_color"] = '#FB7199' - return {"type": "MAJOR_TYPE_COURSES", "courses": module_dynamic["dynCourSeason"]} + module_dynamic["dynCourSeason"]["sub_title"] = module_dynamic[ + "dynCourSeason" + ]["text1"] + module_dynamic["dynCourSeason"]["badge"]["color"] = "#ffffff" + module_dynamic["dynCourSeason"]["badge"]["bg_color"] = "#FB7199" + return { + "type": "MAJOR_TYPE_COURSES", + "courses": module_dynamic["dynCourSeason"], + } except Exception as e: logger.exception("error") elif "dynCommonLive" in module_dynamic: try: - module_dynamic["dynCommonLive"]["desc_first"] = module_dynamic["dynCommonLive"]["coverLabel"] - if "coverLabel2" in module_dynamic["dynCommonLive"]: - module_dynamic["dynCommonLive"]["desc_second"] = module_dynamic["dynCommonLive"]["coverLabel2"] - module_dynamic["dynCommonLive"]["badge"]["color"] = '#ffffff' - module_dynamic["dynCommonLive"]["badge"]["bg_color"] = '#FB7199' - return {"type": "MAJOR_TYPE_LIVE", "live": module_dynamic["dynCommonLive"]} + module_dynamic["dynCommonLive"]["desc_first"] = module_dynamic[ + "dynCommonLive" + ]["coverLabel"] + if "coverLabel2" in module_dynamic["dynCommonLive"]: + module_dynamic["dynCommonLive"]["desc_second"] = module_dynamic[ + "dynCommonLive" + ]["coverLabel2"] + module_dynamic["dynCommonLive"]["badge"]["color"] = "#ffffff" + module_dynamic["dynCommonLive"]["badge"]["bg_color"] = "#FB7199" + return { + "type": "MAJOR_TYPE_LIVE", + "live": module_dynamic["dynCommonLive"], + } except Exception as e: logger.exception("error") elif "dynUgcSeason" in module_dynamic: @@ -277,9 +361,21 @@ async def get_grpc_major(message: dict) -> Union[dict, None]: dynUgcSeason = module_dynamic["dynUgcSeason"] title = dynUgcSeason["title"] cover = dynUgcSeason["cover"] - badge = {"text":"合集","color":"#FFFFFF", "bg_color":"#FB7299"} - stat = {"danmaku":dynUgcSeason["coverLeftText3"],"play":dynUgcSeason["coverLeftText2"]} - return {"type":"MAJOR_TYPE_UGC_SEASON","ugc_season":{"title":title,"cover":cover,"duration_text":dynUgcSeason["coverLeftText1"],"badge":badge,"stat":stat}} + badge = {"text": "合集", "color": "#FFFFFF", "bg_color": "#FB7299"} + stat = { + "danmaku": dynUgcSeason["coverLeftText3"], + "play": dynUgcSeason["coverLeftText2"], + } + return { + "type": "MAJOR_TYPE_UGC_SEASON", + "ugc_season": { + "title": title, + "cover": cover, + "duration_text": dynUgcSeason["coverLeftText1"], + "badge": badge, + "stat": stat, + }, + } except Exception as e: logger.exception("error") else: @@ -300,9 +396,11 @@ async def get_grpc_additional(message: dict) -> Union[dict, None]: if i["moduleType"] == "module_additional": try: if i["moduleAdditional"]["type"] == "additional_type_up_reservation": - reserve = {"title": i["moduleAdditional"]["up"]["title"], - "desc1": i["moduleAdditional"]["up"]["descText1"], - "desc2": {"text": i["moduleAdditional"]["up"]["descText2"]}} + reserve = { + "title": i["moduleAdditional"]["up"]["title"], + "desc1": i["moduleAdditional"]["up"]["descText1"], + "desc2": {"text": i["moduleAdditional"]["up"]["descText2"]}, + } if "descText3" in i["moduleAdditional"]["up"]: reserve["desc3"] = i["moduleAdditional"]["up"]["descText3"] return {"type": "ADDITIONAL_TYPE_RESERVE", "reserve": reserve} @@ -313,7 +411,7 @@ async def get_grpc_additional(message: dict) -> Union[dict, None]: items.append(j) goods = { "head_text": i["moduleAdditional"]["goods"]["rcmdDesc"], - "items": items + "items": items, } return {"type": "ADDITIONAL_TYPE_GOODS", "goods": goods} elif i["moduleAdditional"]["type"] == "additional_type_common": @@ -327,16 +425,21 @@ async def get_grpc_additional(message: dict) -> Union[dict, None]: "cover": i["moduleAdditional"]["common"]["imageUrl"], "title": i["moduleAdditional"]["common"]["title"], "desc1": i["moduleAdditional"]["common"]["descText1"], - "desc2": i["moduleAdditional"]["common"]["descText2"] + "desc2": i["moduleAdditional"]["common"]["descText2"], } return {"type": "ADDITIONAL_TYPE_COMMON", "common": common} elif i["moduleAdditional"]["type"] == "additional_type_ugc": - i["moduleAdditional"]["ugc"]["desc_second"] = i["moduleAdditional"]["ugc"]["descText2"] - return {"type": "ADDITIONAL_TYPE_UGC", "ugc": i["moduleAdditional"]["ugc"]} + i["moduleAdditional"]["ugc"]["desc_second"] = i["moduleAdditional"][ + "ugc" + ]["descText2"] + return { + "type": "ADDITIONAL_TYPE_UGC", + "ugc": i["moduleAdditional"]["ugc"], + } elif i["moduleAdditional"]["type"] == "additional_type_vote": vote = { "desc": i["moduleAdditional"]["vote2"]["title"], - "join_num": i["moduleAdditional"]["vote2"]["total"] + "join_num": i["moduleAdditional"]["vote2"]["total"], } return {"type": "ADDITIONAL_TYPE_VOTE", "vote": vote} except Exception: @@ -355,13 +458,34 @@ async def get_grpc_forward(message: dict) -> Union[Forward, None]: """ dynamic_forward = None for i in message["modules"]: - try: - module_type = i["moduleDynamic"]["type"] - if i["moduleType"] == "module_dynamic" and module_type == "mdl_dyn_forward": - dynamic_forward = i["moduleDynamic"]["dynForward"]["item"] - break - except Exception as e: - continue + module_type = i["moduleType"] + # try: + if ( + module_type == "module_dynamic" + and "type" in i["moduleDynamic"] + and i["moduleDynamic"]["type"] == "mdl_dyn_forward" + ): + dynamic_forward = i["moduleDynamic"]["dynForward"]["item"] + break + elif module_type == "module_item_null": + forward_message_type = "DYNAMIC_TYPE_NONE" + forward_header = {"name": "", "mid": 0} + forward_major = { + "type": "MAJOR_TYPE_NONE", + "none": {"tips": i["moduleItemNull"]["text"]}, + } + forward_text = None + forward_additional = None + forward = Forward( + message_type=forward_message_type, + header=forward_header, + text=forward_text, + major=forward_major, + additional=forward_additional, + ) + return forward + # except Exception as e: + # print(i["moduleDynamic"]) if dynamic_forward: forward_message_type = dynamic_forward["cardType"] forward_header = await get_grpc_forward_header(dynamic_forward) @@ -373,9 +497,10 @@ async def get_grpc_forward(message: dict) -> Union[Forward, None]: header=forward_header, text=forward_text, major=forward_major, - additional=forward_additional + additional=forward_additional, ) return forward + else: return None @@ -409,13 +534,21 @@ async def web_formate(message: dict) -> RenderMessage: forward_text = message["orig"]["modules"]["module_dynamic"]["desc"] if message["orig"]["modules"]["module_dynamic"]["topic"] is not None: if forward_text: - forward_text["topic"] = message["orig"]["modules"]["module_dynamic"]["topic"] + forward_text["topic"] = message["orig"]["modules"]["module_dynamic"][ + "topic" + ] else: - forward_text = {"topic":message["orig"]["modules"]["module_dynamic"]["topic"]} - - - forward = Forward(header=forward_header, message_type=forward_type, major=forward_major, - additional=forward_additional, text=forward_text) + forward_text = { + "topic": message["orig"]["modules"]["module_dynamic"]["topic"] + } + + forward = Forward( + header=forward_header, + message_type=forward_type, + major=forward_major, + additional=forward_additional, + text=forward_text, + ) except KeyError: forward = None @@ -428,7 +561,7 @@ async def web_formate(message: dict) -> RenderMessage: if text is not None: text["topic"] = message["modules"]["module_dynamic"]["topic"] else: - text = {"topic":message["modules"]["module_dynamic"]["topic"]} + text = {"topic": message["modules"]["module_dynamic"]["topic"]} except KeyError: text = None @@ -436,10 +569,9 @@ async def web_formate(message: dict) -> RenderMessage: text = None except Exception as e: - text=None + text = None logger.exception("error") - render_message = RenderMessage( message_type=message["type"], message_id=message_id, diff --git a/dynamicadaptor/Header.py b/dynamicadaptor/Header.py index 235cd99..042bdbc 100644 --- a/dynamicadaptor/Header.py +++ b/dynamicadaptor/Header.py @@ -7,23 +7,23 @@ class OfficialVerify(BaseModel): class Pendant(BaseModel): - pid: Optional[int] - image: Optional[str] - pendant_name: Optional[str] + pid: Optional[int] = None + image: Optional[str] = None + pendant_name: Optional[str] = None class Vip(BaseModel): - status: Optional[int] + status: Optional[int] = None type: int - avatar_subscript: Optional[int] + avatar_subscript: Optional[int] = None class Head(BaseModel): name: str mid: int - face: Optional[str] - pub_time: Optional[str] - pub_ts: Optional[int] - vip: Optional[Vip] - pendant: Optional[Pendant] - official_verify: Optional[OfficialVerify] + face: Optional[str] = None + pub_time: Optional[str] = None + pub_ts: Optional[int] = None + vip: Optional[Vip] = None + pendant: Optional[Pendant] = None + official_verify: Optional[OfficialVerify] = None diff --git a/dynamicadaptor/Majors.py b/dynamicadaptor/Majors.py index bec5766..27fa218 100644 --- a/dynamicadaptor/Majors.py +++ b/dynamicadaptor/Majors.py @@ -1,43 +1,41 @@ -from typing import List, Optional - +from typing import List, Optional, Union from pydantic import BaseModel, Json -# 图片 class DrawItem(BaseModel): height: int width: int - src: str + src: Optional[str] = None + url: Optional[str] = None class Draw(BaseModel): items: List[DrawItem] -# 视频 class Badge(BaseModel): - text: Optional[str] - color: Optional[str] - bg_color: Optional[str] + text: Optional[str] = None + color: Optional[str] = None + bg_color: Optional[str] = None class Archive(BaseModel): cover: str title: str - desc: Optional[str] - badge: Optional[Badge] + desc: Optional[str] = None + badge: Optional[Badge] = None duration_text: str # 直播 class WatchShow(BaseModel): - text_large:str + text_large: str class LivePlayInfo(BaseModel): title: str cover: str - watched_show:WatchShow + watched_show: WatchShow class LiveRcmdContent(BaseModel): @@ -48,7 +46,6 @@ class LiveRcmd(BaseModel): content: Json[LiveRcmdContent] -# 专栏 class Article(BaseModel): covers: List[str] title: str @@ -56,7 +53,6 @@ class Article(BaseModel): label: str -# common class Common(BaseModel): """ |_biz_type @@ -69,20 +65,18 @@ class Common(BaseModel): |_212 话题分享 746597704318058512 """ biz_type: int - badge: Optional[Badge] - cover: Optional[str] - desc: Optional[str] - title: Optional[str] + badge: Optional[Badge] = None + cover: Optional[str] = None + desc: Optional[str] = None + title: Optional[str] = None -# 音乐 class Music(BaseModel): cover: str label: str title: str -# pgc class Stat(BaseModel): danmaku: str play: str @@ -95,7 +89,6 @@ class Pgc(BaseModel): stat: Stat -# MediaList class MediaList(BaseModel): badge: Badge cover: str @@ -103,7 +96,6 @@ class MediaList(BaseModel): sub_title: str -# COURSES class Courses(BaseModel): badge: Badge cover: str @@ -112,23 +104,49 @@ class Courses(BaseModel): sub_title: str -# Live class Live(BaseModel): badge: Badge cover: str desc_first: str - desc_second: Optional[str] + desc_second: Optional[str] = None title: str + class UgcSeason(BaseModel): - title:str - cover:str - duration_text:str - desc:Optional[str] - stat:Optional[Stat] - badge:Optional[Badge] + title: str + cover: str + duration_text: str + desc: Optional[str] = None + stat: Optional[Stat] = None + badge: Optional[Badge] = None +class MNone(BaseModel): + tips: str + + +class Emoji(BaseModel): + icon_url: Optional[str] = None + text: Optional[str] = None + type: Union[int, str, None] = None + + +class RichTextNodes(BaseModel): + type: str + text: str + orig_text: Optional[str] = None + emoji: Optional[Emoji] = None + + +class Summary(BaseModel): + text: str + rich_text_nodes: List[RichTextNodes] + + +class OPUS(BaseModel): + pics: Optional[List[DrawItem]] = None + summary: Optional[Summary] = None + title: Optional[str] = None # class MajorDetail(Enum): # """ @@ -137,26 +155,45 @@ class UgcSeason(BaseModel): # archive 视频 739851131027456201 # live_rcmd 直播 # ugc_season 合集 755703296984875092 -# article 专栏 720929682647679043 +# article 专栏 819930757423169558 # common 装扮 活动等 551309621391003098/743181895357956118 -# music 音乐 692040384055869478 +# music 音乐 819725994851041346 # pgc 电影/电视剧等 633983562923638785 # medialist 收藏列表 645144864359448578 # courses 课程 440646043801479846 # live 转发直播 727260760787386403 # """ +class BgImage(BaseModel): + img_dark: str + img_day: str + + +class Button(BaseModel): + icon: Optional[str] = None + text: Optional[str] = None + + +class Blocked(BaseModel): + hint_message: Optional[str] = None + blocked_type: int + bg_img: Optional[BgImage] = None + icon: Optional[BgImage] = None + class Major(BaseModel): type: str - draw: Optional[Draw] - archive: Optional[Archive] - live_rcmd: Optional[LiveRcmd] - article: Optional[Article] - common: Optional[Common] - music: Optional[Music] - pgc: Optional[Pgc] - medialist: Optional[MediaList] - courses: Optional[Courses] - live: Optional[Live] - ugc_season: Optional[UgcSeason] + draw: Optional[Draw] = None + archive: Optional[Archive] = None + live_rcmd: Optional[LiveRcmd] = None + article: Optional[Article] = None + common: Optional[Common] = None + music: Optional[Music] = None + pgc: Optional[Pgc] = None + medialist: Optional[MediaList] = None + courses: Optional[Courses] = None + live: Optional[Live] = None + ugc_season: Optional[UgcSeason] = None + opus: Optional[OPUS] = None + none: Optional[MNone] = None + blocked: Optional[Blocked] = None diff --git a/dynamicadaptor/Message.py b/dynamicadaptor/Message.py index 6186d84..2dc6b60 100644 --- a/dynamicadaptor/Message.py +++ b/dynamicadaptor/Message.py @@ -9,9 +9,9 @@ class RenderMessage(BaseModel): message_type: str - message_id:str + message_id: str header: Head - text: Optional[Text] - major: Optional[Major] - additional: Optional[Additional] - forward: Optional[Forward] + text: Optional[Text] = None + major: Optional[Major] = None + additional: Optional[Additional] = None + forward: Optional[Forward] = None diff --git a/dynamicadaptor/Repost.py b/dynamicadaptor/Repost.py index 03b248d..fc818b5 100644 --- a/dynamicadaptor/Repost.py +++ b/dynamicadaptor/Repost.py @@ -9,6 +9,6 @@ class Forward(BaseModel): message_type: str header: Head - text: Optional[Text] - major: Optional[Major] - additional: Optional[Additional] + text: Optional[Text] = None + major: Optional[Major] = None + additional: Optional[Additional] = None diff --git a/poetry.lock b/poetry.lock index 8bc7e35..6ba327e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,514 +1,219 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. - -[[package]] -name = "anyio" -version = "3.6.2" -description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "dev" -optional = false -python-versions = ">=3.6.2" -files = [ - {file = "anyio-3.6.2-py3-none-any.whl", hash = "sha256:fbbe32bd270d2a2ef3ed1c5d45041250284e31fc0a4df4a5a6071842051a51e3"}, - {file = "anyio-3.6.2.tar.gz", hash = "sha256:25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421"}, -] - -[package.dependencies] -idna = ">=2.8" -sniffio = ">=1.1" - -[package.extras] -doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] -trio = ["trio (>=0.16,<0.22)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "bilirpc" -version = "0.1.3" -description = "" -category = "dev" -optional = false -python-versions = ">=3.8,<4.0" -files = [ - {file = "BiliRpc-0.1.3-py3-none-any.whl", hash = "sha256:643d889051eb75e45e64402c856862246637459338dd93b3c22c10f5d0206bfe"}, - {file = "BiliRpc-0.1.3.tar.gz", hash = "sha256:bbb4968c7f93aac551aa10a68abeeec442618d358ba182a1c486b724e0175d98"}, -] - -[package.dependencies] -grpcio-tools = ">=1.49.1,<2.0.0" - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "certifi" -version = "2022.12.7" -description = "Python package for providing Mozilla's CA Bundle." -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "grpcio" -version = "1.51.1" -description = "HTTP/2-based RPC framework" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "grpcio-1.51.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:cc2bece1737b44d878cc1510ea04469a8073dbbcdd762175168937ae4742dfb3"}, - {file = "grpcio-1.51.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:e223a9793522680beae44671b9ed8f6d25bbe5ddf8887e66aebad5e0686049ef"}, - {file = "grpcio-1.51.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:24ac1154c4b2ab4a0c5326a76161547e70664cd2c39ba75f00fc8a2170964ea2"}, - {file = "grpcio-1.51.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e4ef09f8997c4be5f3504cefa6b5c6cc3cf648274ce3cede84d4342a35d76db6"}, - {file = "grpcio-1.51.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8a0b77e992c64880e6efbe0086fe54dfc0bbd56f72a92d9e48264dcd2a3db98"}, - {file = "grpcio-1.51.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:eacad297ea60c72dd280d3353d93fb1dcca952ec11de6bb3c49d12a572ba31dd"}, - {file = "grpcio-1.51.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:16c71740640ba3a882f50b01bf58154681d44b51f09a5728180a8fdc66c67bd5"}, - {file = "grpcio-1.51.1-cp310-cp310-win32.whl", hash = "sha256:29cb97d41a4ead83b7bcad23bdb25bdd170b1e2cba16db6d3acbb090bc2de43c"}, - {file = "grpcio-1.51.1-cp310-cp310-win_amd64.whl", hash = "sha256:9ff42c5620b4e4530609e11afefa4a62ca91fa0abb045a8957e509ef84e54d30"}, - {file = "grpcio-1.51.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:bc59f7ba87972ab236f8669d8ca7400f02a0eadf273ca00e02af64d588046f02"}, - {file = "grpcio-1.51.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:3c2b3842dcf870912da31a503454a33a697392f60c5e2697c91d133130c2c85d"}, - {file = "grpcio-1.51.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22b011674090594f1f3245960ced7386f6af35485a38901f8afee8ad01541dbd"}, - {file = "grpcio-1.51.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49d680356a975d9c66a678eb2dde192d5dc427a7994fb977363634e781614f7c"}, - {file = "grpcio-1.51.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:094e64236253590d9d4075665c77b329d707b6fca864dd62b144255e199b4f87"}, - {file = "grpcio-1.51.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:257478300735ce3c98d65a930bbda3db172bd4e00968ba743e6a1154ea6edf10"}, - {file = "grpcio-1.51.1-cp311-cp311-win32.whl", hash = "sha256:5a6ebcdef0ef12005d56d38be30f5156d1cb3373b52e96f147f4a24b0ddb3a9d"}, - {file = "grpcio-1.51.1-cp311-cp311-win_amd64.whl", hash = "sha256:3f9b0023c2c92bebd1be72cdfca23004ea748be1813a66d684d49d67d836adde"}, - {file = "grpcio-1.51.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:cd3baccea2bc5c38aeb14e5b00167bd4e2373a373a5e4d8d850bd193edad150c"}, - {file = "grpcio-1.51.1-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:17ec9b13cec4a286b9e606b48191e560ca2f3bbdf3986f91e480a95d1582e1a7"}, - {file = "grpcio-1.51.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:fbdbe9a849854fe484c00823f45b7baab159bdd4a46075302281998cb8719df5"}, - {file = "grpcio-1.51.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:31bb6bc7ff145e2771c9baf612f4b9ebbc9605ccdc5f3ff3d5553de7fc0e0d79"}, - {file = "grpcio-1.51.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e473525c28251558337b5c1ad3fa969511e42304524a4e404065e165b084c9e4"}, - {file = "grpcio-1.51.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6f0b89967ee11f2b654c23b27086d88ad7bf08c0b3c2a280362f28c3698b2896"}, - {file = "grpcio-1.51.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7942b32a291421460d6a07883033e392167d30724aa84987e6956cd15f1a21b9"}, - {file = "grpcio-1.51.1-cp37-cp37m-win32.whl", hash = "sha256:f96ace1540223f26fbe7c4ebbf8a98e3929a6aa0290c8033d12526847b291c0f"}, - {file = "grpcio-1.51.1-cp37-cp37m-win_amd64.whl", hash = "sha256:f1fec3abaf274cdb85bf3878167cfde5ad4a4d97c68421afda95174de85ba813"}, - {file = "grpcio-1.51.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:0e1a9e1b4a23808f1132aa35f968cd8e659f60af3ffd6fb00bcf9a65e7db279f"}, - {file = "grpcio-1.51.1-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:6df3b63538c362312bc5fa95fb965069c65c3ea91d7ce78ad9c47cab57226f54"}, - {file = "grpcio-1.51.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:172405ca6bdfedd6054c74c62085946e45ad4d9cec9f3c42b4c9a02546c4c7e9"}, - {file = "grpcio-1.51.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:506b9b7a4cede87d7219bfb31014d7b471cfc77157da9e820a737ec1ea4b0663"}, - {file = "grpcio-1.51.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fb93051331acbb75b49a2a0fd9239c6ba9528f6bdc1dd400ad1cb66cf864292"}, - {file = "grpcio-1.51.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5dca372268c6ab6372d37d6b9f9343e7e5b4bc09779f819f9470cd88b2ece3c3"}, - {file = "grpcio-1.51.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:471d39d3370ca923a316d49c8aac66356cea708a11e647e3bdc3d0b5de4f0a40"}, - {file = "grpcio-1.51.1-cp38-cp38-win32.whl", hash = "sha256:75e29a90dc319f0ad4d87ba6d20083615a00d8276b51512e04ad7452b5c23b04"}, - {file = "grpcio-1.51.1-cp38-cp38-win_amd64.whl", hash = "sha256:f1158bccbb919da42544a4d3af5d9296a3358539ffa01018307337365a9a0c64"}, - {file = "grpcio-1.51.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:59dffade859f157bcc55243714d57b286da6ae16469bf1ac0614d281b5f49b67"}, - {file = "grpcio-1.51.1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:dad6533411d033b77f5369eafe87af8583178efd4039c41d7515d3336c53b4f1"}, - {file = "grpcio-1.51.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:4c4423ea38a7825b8fed8934d6d9aeebdf646c97e3c608c3b0bcf23616f33877"}, - {file = "grpcio-1.51.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0dc5354e38e5adf2498312f7241b14c7ce3484eefa0082db4297189dcbe272e6"}, - {file = "grpcio-1.51.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97d67983189e2e45550eac194d6234fc38b8c3b5396c153821f2d906ed46e0ce"}, - {file = "grpcio-1.51.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:538d981818e49b6ed1e9c8d5e5adf29f71c4e334e7d459bf47e9b7abb3c30e09"}, - {file = "grpcio-1.51.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9235dcd5144a83f9ca6f431bd0eccc46b90e2c22fe27b7f7d77cabb2fb515595"}, - {file = "grpcio-1.51.1-cp39-cp39-win32.whl", hash = "sha256:aacb54f7789ede5cbf1d007637f792d3e87f1c9841f57dd51abf89337d1b8472"}, - {file = "grpcio-1.51.1-cp39-cp39-win_amd64.whl", hash = "sha256:2b170eaf51518275c9b6b22ccb59450537c5a8555326fd96ff7391b5dd75303c"}, - {file = "grpcio-1.51.1.tar.gz", hash = "sha256:e6dfc2b6567b1c261739b43d9c59d201c1b89e017afd9e684d85aa7a186c9f7a"}, -] - -[package.extras] -protobuf = ["grpcio-tools (>=1.51.1)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "grpcio-tools" -version = "1.51.1" -description = "Protobuf code generator for gRPC" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "grpcio-tools-1.51.1.tar.gz", hash = "sha256:8e62d23d3fed9d4f81738f98dd193dbd2e21aed4a8f0dd715e75b5439e649727"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:ecf1494cb695afead36995534f787761ee33fb9e116b23030113a37fe6057a83"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:16b8b915625dc6eb2ea7efdfb06f1fae44a9066c9016453a2ca120c034f33090"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:d5e033c04b416afcddd5231b3ff94a34fb5d26fba2416eb940e69b05f22cfd25"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a218f64e667f3332b74080bdc5440aaf0fa6700ae07a0b54ecf085aaef2aa9f"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b186183515ad6b8584ffe4bd820b72b00f6e7d121fb1c36294edeea9092313"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ccd37165d7a3e93f460096a2eb62b7a9c1ebe5c424eaee42d8e92740d0c8f6bc"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:531586c5598a99658249f3c5e92826d6d2bb117abd6ffc88527d1e1d9eaef924"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-win32.whl", hash = "sha256:392ad4cd004f7b843cf7d916d9a15b2d6585965bfef235be1c88d8f8649777e5"}, - {file = "grpcio_tools-1.51.1-cp310-cp310-win_amd64.whl", hash = "sha256:14e82c2b3ee7e300611c2c729d411b3b911e4cca5f4ec14787457a2fb72ff9d4"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:2281180490c475d09b7aa05dabafa5e09de9902176931e7295113f636c2b5360"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:c4649af7f5d9553975ee66b6bfae20a84be779f13e163fa835e782961895e63c"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f06bb0753b7cecbff154b523cfb8f45dee2c31b0a4c72bed7da44c57f1cba113"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a671466158ed74c07ee070fb940ed783acf59ba6e6e53cb4de8fd63819c6c7f"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:048793747339f327ea091d8f022c6756d89713d8080dffde5ce7380cc348ea8e"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f6caf36e7752728329a28f93afec7c4ec9015fc1c6e4460bd1eb0f3737e1c55a"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-win32.whl", hash = "sha256:67b304282cad38642587ebae68617e450e1ad4fa1c0c8b19e9e30274dbb32716"}, - {file = "grpcio_tools-1.51.1-cp311-cp311-win_amd64.whl", hash = "sha256:674b340f2f7bb2adbc3f15144bd37ce5ea83239f78b68dbbd0ea3cba00107e2b"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:055819992ddd30c642a7fd6f344a03747be3afa95cb910f8a2e5efaabd41cde5"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:4e3249a2ec435b3b972610c66c8a714c188844500d564c910f57a2771dc61978"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:794f26a09b70f4f101df5cf54c6c12dc1b65747ab1dee5bda02c2991389ade56"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4957f1ffa16598aa5379505fcbaeb47d65693a46b0817f4ee61db76707092aeb"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9906fb6bf6d9c30c23d85153f12d130f44325afe8f9ebe58aa7a6c82ecade9d8"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87bc5f3e3698c65907d397003c64d25c3ea84e3d6aa46dac133bd98bf66835ee"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a66b3a5d18a7615f0f828b72e2d2935751459c89cc4725e56bdfb3d2cd93281f"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-win32.whl", hash = "sha256:566809d9942e78821b279af70f3cf159a328127f9f3d5fee8d83ad8b2d27b2fe"}, - {file = "grpcio_tools-1.51.1-cp37-cp37m-win_amd64.whl", hash = "sha256:aab24a342642329de38139cb26f8492882ca0d8551bb87f6530bcc613945a0d0"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:6b83d7fc2597c6d392c225177d1fbbcff74900f8cc40b33236987fd1ff841330"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:79c06d2577cb4d977922bbf01234de3b20f73d1784d3cbe3179deee1bdb9a60b"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:e9abc03d67793b1bf33dc766caa69a3333f9db029869ba6e8fc6cd9c251c0080"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64d8ad369417759f5fdb8ffb7cbd6374fecc06ab51c9a226dee9bbd7d311c3b5"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de51a0a71845b854f6a5967756c893c96bd03e37f39e5dce87b4f409dac36ee2"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9dfe6c12b0e2c07f6a4a91a9912ef4e5bd007672533891a44e6f433ffbf7c3b1"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:27113b354f7587684eb55125733e6e5be1f489458abfe12344dabd918d8dcc54"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-win32.whl", hash = "sha256:98777b5031f1b3c58b688815ffa83435c103b2152c26eb144f80f4a4bb34addb"}, - {file = "grpcio_tools-1.51.1-cp38-cp38-win_amd64.whl", hash = "sha256:1c44b57a6770b78a1eafe355878ff1ec59a2fa07455a2cbd522c071eedae04d4"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:49624394805568acd7d767dea5a00d970fca5ad8f395fe0161eeea0de5133eba"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:6d6626a6e4dbe843df96dc8c08dd244d2191a75324f54bfa4ebaa3e76b0b1958"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:b4fb8ed6d29f2d6cf03ef99ffaad635bbc132a59be77013691392fe557e67144"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8cc862a1ad30f94528d66cc6f95fb9e659005e568313e54a23550535b649573"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e72a30be1746ea0749a8486d0ca0120c0b2757fe84fc246a5144b1ef66d7b89"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:331a897306adeec3c67470431ea8d8b4972b689d32966f94506d91f4dac20952"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f336ad9be661d92fa45940e74e8ff3d78e67ebe9b4f7ea8774b2d680c17aeb6c"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-win32.whl", hash = "sha256:40ef70e8c5d0310dedff9af502b520b4c7e215bce94094527fb959150a0c594a"}, - {file = "grpcio_tools-1.51.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b8acf4eaa0ebe37e2f69108de49efd935b7abe9c7e58ba737490b99906aa76"}, -] - -[package.dependencies] -grpcio = ">=1.51.1" -protobuf = ">=4.21.6,<5.0dev" -setuptools = "*" - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "h11" -version = "0.14.0" -description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "httpcore" -version = "0.16.3" -description = "A minimal low-level HTTP client." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, - {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, -] - -[package.dependencies] -anyio = ">=3.0,<5.0" -certifi = "*" -h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" - -[package.extras] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "httpx" -version = "0.23.3" -description = "The next generation HTTP client." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "httpx-0.23.3-py3-none-any.whl", hash = "sha256:a211fcce9b1254ea24f0cd6af9869b3d29aba40154e947d2a07bb499b3e310d6"}, - {file = "httpx-0.23.3.tar.gz", hash = "sha256:9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9"}, -] - -[package.dependencies] -certifi = "*" -httpcore = ">=0.15.0,<0.17.0" -rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} -sniffio = "*" - -[package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "loguru" -version = "0.6.0" -description = "Python logging made (stupidly) simple" -category = "main" -optional = false -python-versions = ">=3.5" -files = [ - {file = "loguru-0.6.0-py3-none-any.whl", hash = "sha256:4e2414d534a2ab57573365b3e6d0234dfb1d84b68b7f3b948e6fb743860a77c3"}, - {file = "loguru-0.6.0.tar.gz", hash = "sha256:066bd06758d0a513e9836fd9c6b5a75bfb3fd36841f4b996bc60b547a309d41c"}, -] - -[package.dependencies] -colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} -win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} - -[package.extras] -dev = ["Sphinx (>=4.1.1)", "black (>=19.10b0)", "colorama (>=0.3.4)", "docutils (==0.16)", "flake8 (>=3.7.7)", "isort (>=5.1.1)", "pytest (>=4.6.2)", "pytest-cov (>=2.7.1)", "sphinx-autobuild (>=0.7.1)", "sphinx-rtd-theme (>=0.4.3)", "tox (>=3.9.0)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "protobuf" -version = "4.21.12" -description = "Protocol Buffers" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "protobuf-4.21.12-cp310-abi3-win32.whl", hash = "sha256:b135410244ebe777db80298297a97fbb4c862c881b4403b71bac9d4107d61fd1"}, - {file = "protobuf-4.21.12-cp310-abi3-win_amd64.whl", hash = "sha256:89f9149e4a0169cddfc44c74f230d7743002e3aa0b9472d8c28f0388102fc4c2"}, - {file = "protobuf-4.21.12-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:299ea899484ee6f44604deb71f424234f654606b983cb496ea2a53e3c63ab791"}, - {file = "protobuf-4.21.12-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:d1736130bce8cf131ac7957fa26880ca19227d4ad68b4888b3be0dea1f95df97"}, - {file = "protobuf-4.21.12-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:78a28c9fa223998472886c77042e9b9afb6fe4242bd2a2a5aced88e3f4422aa7"}, - {file = "protobuf-4.21.12-cp37-cp37m-win32.whl", hash = "sha256:3d164928ff0727d97022957c2b849250ca0e64777ee31efd7d6de2e07c494717"}, - {file = "protobuf-4.21.12-cp37-cp37m-win_amd64.whl", hash = "sha256:f45460f9ee70a0ec1b6694c6e4e348ad2019275680bd68a1d9314b8c7e01e574"}, - {file = "protobuf-4.21.12-cp38-cp38-win32.whl", hash = "sha256:6ab80df09e3208f742c98443b6166bcb70d65f52cfeb67357d52032ea1ae9bec"}, - {file = "protobuf-4.21.12-cp38-cp38-win_amd64.whl", hash = "sha256:1f22ac0ca65bb70a876060d96d914dae09ac98d114294f77584b0d2644fa9c30"}, - {file = "protobuf-4.21.12-cp39-cp39-win32.whl", hash = "sha256:27f4d15021da6d2b706ddc3860fac0a5ddaba34ab679dc182b60a8bb4e1121cc"}, - {file = "protobuf-4.21.12-cp39-cp39-win_amd64.whl", hash = "sha256:237216c3326d46808a9f7c26fd1bd4b20015fb6867dc5d263a493ef9a539293b"}, - {file = "protobuf-4.21.12-py2.py3-none-any.whl", hash = "sha256:a53fd3f03e578553623272dc46ac2f189de23862e68565e83dde203d41b76fc5"}, - {file = "protobuf-4.21.12-py3-none-any.whl", hash = "sha256:b98d0148f84e3a3c569e19f52103ca1feacdac0d2df8d6533cf983d1fda28462"}, - {file = "protobuf-4.21.12.tar.gz", hash = "sha256:7cd532c4566d0e6feafecc1059d04c7915aec8e182d1cf7adee8b24ef1e2e6ab"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "pydantic" -version = "1.10.4" -description = "Data validation and settings management using python type hints" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pydantic-1.10.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5635de53e6686fe7a44b5cf25fcc419a0d5e5c1a1efe73d49d48fe7586db854"}, - {file = "pydantic-1.10.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6dc1cc241440ed7ca9ab59d9929075445da6b7c94ced281b3dd4cfe6c8cff817"}, - {file = "pydantic-1.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51bdeb10d2db0f288e71d49c9cefa609bca271720ecd0c58009bd7504a0c464c"}, - {file = "pydantic-1.10.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78cec42b95dbb500a1f7120bdf95c401f6abb616bbe8785ef09887306792e66e"}, - {file = "pydantic-1.10.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8775d4ef5e7299a2f4699501077a0defdaac5b6c4321173bcb0f3c496fbadf85"}, - {file = "pydantic-1.10.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:572066051eeac73d23f95ba9a71349c42a3e05999d0ee1572b7860235b850cc6"}, - {file = "pydantic-1.10.4-cp310-cp310-win_amd64.whl", hash = "sha256:7feb6a2d401f4d6863050f58325b8d99c1e56f4512d98b11ac64ad1751dc647d"}, - {file = "pydantic-1.10.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:39f4a73e5342b25c2959529f07f026ef58147249f9b7431e1ba8414a36761f53"}, - {file = "pydantic-1.10.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:983e720704431a6573d626b00662eb78a07148c9115129f9b4351091ec95ecc3"}, - {file = "pydantic-1.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75d52162fe6b2b55964fbb0af2ee58e99791a3138588c482572bb6087953113a"}, - {file = "pydantic-1.10.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fdf8d759ef326962b4678d89e275ffc55b7ce59d917d9f72233762061fd04a2d"}, - {file = "pydantic-1.10.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05a81b006be15655b2a1bae5faa4280cf7c81d0e09fcb49b342ebf826abe5a72"}, - {file = "pydantic-1.10.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d88c4c0e5c5dfd05092a4b271282ef0588e5f4aaf345778056fc5259ba098857"}, - {file = "pydantic-1.10.4-cp311-cp311-win_amd64.whl", hash = "sha256:6a05a9db1ef5be0fe63e988f9617ca2551013f55000289c671f71ec16f4985e3"}, - {file = "pydantic-1.10.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:887ca463c3bc47103c123bc06919c86720e80e1214aab79e9b779cda0ff92a00"}, - {file = "pydantic-1.10.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdf88ab63c3ee282c76d652fc86518aacb737ff35796023fae56a65ced1a5978"}, - {file = "pydantic-1.10.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a48f1953c4a1d9bd0b5167ac50da9a79f6072c63c4cef4cf2a3736994903583e"}, - {file = "pydantic-1.10.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a9f2de23bec87ff306aef658384b02aa7c32389766af3c5dee9ce33e80222dfa"}, - {file = "pydantic-1.10.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:cd8702c5142afda03dc2b1ee6bc358b62b3735b2cce53fc77b31ca9f728e4bc8"}, - {file = "pydantic-1.10.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6e7124d6855b2780611d9f5e1e145e86667eaa3bd9459192c8dc1a097f5e9903"}, - {file = "pydantic-1.10.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b53e1d41e97063d51a02821b80538053ee4608b9a181c1005441f1673c55423"}, - {file = "pydantic-1.10.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:55b1625899acd33229c4352ce0ae54038529b412bd51c4915349b49ca575258f"}, - {file = "pydantic-1.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:301d626a59edbe5dfb48fcae245896379a450d04baeed50ef40d8199f2733b06"}, - {file = "pydantic-1.10.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6f9d649892a6f54a39ed56b8dfd5e08b5f3be5f893da430bed76975f3735d15"}, - {file = "pydantic-1.10.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d7b5a3821225f5c43496c324b0d6875fde910a1c2933d726a743ce328fbb2a8c"}, - {file = "pydantic-1.10.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:f2f7eb6273dd12472d7f218e1fef6f7c7c2f00ac2e1ecde4db8824c457300416"}, - {file = "pydantic-1.10.4-cp38-cp38-win_amd64.whl", hash = "sha256:4b05697738e7d2040696b0a66d9f0a10bec0efa1883ca75ee9e55baf511909d6"}, - {file = "pydantic-1.10.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a9a6747cac06c2beb466064dda999a13176b23535e4c496c9d48e6406f92d42d"}, - {file = "pydantic-1.10.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:eb992a1ef739cc7b543576337bebfc62c0e6567434e522e97291b251a41dad7f"}, - {file = "pydantic-1.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:990406d226dea0e8f25f643b370224771878142155b879784ce89f633541a024"}, - {file = "pydantic-1.10.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e82a6d37a95e0b1b42b82ab340ada3963aea1317fd7f888bb6b9dfbf4fff57c"}, - {file = "pydantic-1.10.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9193d4f4ee8feca58bc56c8306bcb820f5c7905fd919e0750acdeeeef0615b28"}, - {file = "pydantic-1.10.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2b3ce5f16deb45c472dde1a0ee05619298c864a20cded09c4edd820e1454129f"}, - {file = "pydantic-1.10.4-cp39-cp39-win_amd64.whl", hash = "sha256:9cbdc268a62d9a98c56e2452d6c41c0263d64a2009aac69246486f01b4f594c4"}, - {file = "pydantic-1.10.4-py3-none-any.whl", hash = "sha256:4948f264678c703f3877d1c8877c4e3b2e12e549c57795107f08cf70c6ec7774"}, - {file = "pydantic-1.10.4.tar.gz", hash = "sha256:b9a3859f24eb4e097502a3be1fb4b2abb79b6103dd9e2e0edb70613a4459a648"}, -] - -[package.dependencies] -typing-extensions = ">=4.2.0" - -[package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "rfc3986" -version = "1.5.0" -description = "Validating URI References per RFC 3986" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, - {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, -] - -[package.dependencies] -idna = {version = "*", optional = true, markers = "extra == \"idna2008\""} - -[package.extras] -idna2008 = ["idna"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "setuptools" -version = "65.6.3" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "setuptools-65.6.3-py3-none-any.whl", hash = "sha256:57f6f22bde4e042978bcd50176fdb381d7c21a9efa4041202288d3737a0c6a54"}, - {file = "setuptools-65.6.3.tar.gz", hash = "sha256:a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "sniffio" -version = "1.3.0" -description = "Sniff out which async library your code is running under" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[[package]] -name = "win32-setctime" -version = "1.1.0" -description = "A small Python utility to set file creation time on Windows" -category = "main" -optional = false -python-versions = ">=3.5" -files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, -] - -[package.extras] -dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "douban" - -[metadata] -lock-version = "2.0" -python-versions = "^3.8.0" -content-hash = "bb21399fe92452c9c24e8365734a5a8bd3f12aa26213786545fecf41fe68b1a1" +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "annotated-types" +version = "0.6.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "loguru" +version = "0.6.0" +description = "Python logging made (stupidly) simple" +optional = false +python-versions = ">=3.5" +files = [ + {file = "loguru-0.6.0-py3-none-any.whl", hash = "sha256:4e2414d534a2ab57573365b3e6d0234dfb1d84b68b7f3b948e6fb743860a77c3"}, + {file = "loguru-0.6.0.tar.gz", hash = "sha256:066bd06758d0a513e9836fd9c6b5a75bfb3fd36841f4b996bc60b547a309d41c"}, +] + +[package.dependencies] +colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} +win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} + +[package.extras] +dev = ["Sphinx (>=4.1.1)", "black (>=19.10b0)", "colorama (>=0.3.4)", "docutils (==0.16)", "flake8 (>=3.7.7)", "isort (>=5.1.1)", "pytest (>=4.6.2)", "pytest-cov (>=2.7.1)", "sphinx-autobuild (>=0.7.1)", "sphinx-rtd-theme (>=0.4.3)", "tox (>=3.9.0)"] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "pydantic" +version = "2.6.1" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, + {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, +] + +[package.dependencies] +annotated-types = ">=0.4.0" +pydantic-core = "2.16.2" +typing-extensions = ">=4.6.1" + +[package.extras] +email = ["email-validator (>=2.0.0)"] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "pydantic-core" +version = "2.16.2" +description = "" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, + {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, + {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, + {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, + {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, + {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, + {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, + {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, + {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, + {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, + {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, + {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, + {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, + {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "typing-extensions" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, +] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[[package]] +name = "win32-setctime" +version = "1.1.0" +description = "A small Python utility to set file creation time on Windows" +optional = false +python-versions = ">=3.5" +files = [ + {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, + {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, +] + +[package.extras] +dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "ts" + +[metadata] +lock-version = "2.0" +python-versions = "^3.8.0" +content-hash = "4bb7e0f8e2e5e6efa86bf3886fec46188f721e76b1d0a15d5c65ab84846eeaf7" diff --git a/pyproject.toml b/pyproject.toml index d9f351d..d3b95ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,27 +1,22 @@ [tool.poetry] name = "DynamicAdaptor" -version = "0.3.7" +version = "0.5.1" description = "" authors = ["DMC "] readme = "README.md" [tool.poetry.dependencies] python = "^3.8.0" -pydantic = "^1.10.4" +pydantic = "<=2.6.1" loguru = "^0.6.0" -[tool.poetry.group.dev.dependencies] -bilirpc = "^0.1.3" -httpx = "^0.23.3" +[[tool.poetry.source]] +name = "ts" +url = "https://pypi.tuna.tsinghua.edu.cn/simple/" +default = true [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -[[tool.poetry.source]] -name = "douban" -url = "https://pypi.tuna.tsinghua.edu.cn/simple/" -default = false -secondary = false - diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/grpc_test.py b/tests/grpc_test.py deleted file mode 100644 index 10555ab..0000000 --- a/tests/grpc_test.py +++ /dev/null @@ -1,18 +0,0 @@ -import asyncio -from bilirpc.api import get_dy_detail -from google.protobuf.json_format import MessageToJson,MessageToDict -from dynamicadaptor.DynamicConversion import formate_message -import json - -async def run(): - message = await get_dy_detail("756200529630068741") - result = await formate_message(message_type="grpc", message=json.loads(MessageToJson(message[0]))) - # with open("a.json","w") as f: - # f.write(MessageToJson(message[0])) - print(result.major) - - - -if __name__ == "__main__": - - asyncio.run(run()) diff --git a/tests/web_test.py b/tests/web_test.py deleted file mode 100644 index ddf5136..0000000 --- a/tests/web_test.py +++ /dev/null @@ -1,19 +0,0 @@ -from dynamicadaptor.DynamicConversion import formate_message -import httpx -import asyncio - -async def run(): - # dyn_id = "75570329698487509" - url = "https://api.bilibili.com/x/polymer/web-dynamic/v1/detail?timezone_offset=-480&id=760523624703590658&features=itemOpusStyle" - headers = { - "referer": "https://t.bilibili.com/760523624703590658", - "origin":"https://t.bilibili.com" - } - res = httpx.get(url, headers=headers).json() - # print(res) - result = await formate_message("web", res["data"]["item"]) - print(result.text) - -if __name__ == "__main__": - - asyncio.run(run())