支持2.4

This commit is contained in:
baiqwerdvd 2024-07-31 18:16:11 +08:00
parent d817eadc4b
commit 7645e9f07d
No known key found for this signature in database
GPG Key ID: 7717E46E1797411A
28 changed files with 4296 additions and 363 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.languageServer": "None"
}

View File

@ -16,7 +16,7 @@ avatarId2EnName_fileName = f"avatarId2EnName_mapping_{version}.json"
EquipmentID2Name_fileName = f"EquipmentID2Name_mapping_{version}.json" EquipmentID2Name_fileName = f"EquipmentID2Name_mapping_{version}.json"
skillId2Name_fileName = f"skillId2Name_mapping_{version}.json" skillId2Name_fileName = f"skillId2Name_mapping_{version}.json"
skillId2Type_fileName = f"skillId2Type_mapping_{version}.json" skillId2Type_fileName = f"skillId2Type_mapping_{version}.json"
Property2Name_fileName = "Property2Name.json" Property2Name_fileName = f"Property2Name_mapping_{version}.json"
RelicId2SetId_fileName = f"RelicId2SetId_mapping_{version}.json" RelicId2SetId_fileName = f"RelicId2SetId_mapping_{version}.json"
SetId2Name_fileName = f"SetId2Name_mapping_{version}.json" SetId2Name_fileName = f"SetId2Name_mapping_{version}.json"
rankId2Name_fileName = f"rankId2Name_mapping_{version}.json" rankId2Name_fileName = f"rankId2Name_mapping_{version}.json"
@ -90,8 +90,7 @@ with Path.open(MAP / EquipmentID2AbilityProperty_fileName, encoding="UTF-8") as
) )
with Path.open(MAP / RelicSetSkill_fileName, encoding="UTF-8") as f: with Path.open(MAP / RelicSetSkill_fileName, encoding="UTF-8") as f:
data = json.load(f) RelicSetSkill = RelicSetSkillModel.from_json(json.load(f))
RelicSetSkill = RelicSetSkillModel.from_json(data)
with Path.open(MAP / skillId2AttackType_fileName, encoding="UTF-8") as f: with Path.open(MAP / skillId2AttackType_fileName, encoding="UTF-8") as f:
skillId2AttackType = msgjson.decode(f.read(), type=Dict[str, str]) skillId2AttackType = msgjson.decode(f.read(), type=Dict[str, str])

View File

@ -2898,6 +2898,48 @@
} }
] ]
}, },
"21046": {
"1": [
{
"PropertyType": "AttackAddedRatio",
"Value": {
"Value": 0.16
}
}
],
"2": [
{
"PropertyType": "AttackAddedRatio",
"Value": {
"Value": 0.2
}
}
],
"3": [
{
"PropertyType": "AttackAddedRatio",
"Value": {
"Value": 0.24
}
}
],
"4": [
{
"PropertyType": "AttackAddedRatio",
"Value": {
"Value": 0.28
}
}
],
"5": [
{
"PropertyType": "AttackAddedRatio",
"Value": {
"Value": 0.32
}
}
]
},
"22002": { "22002": {
"1": [ "1": [
{ {
@ -2946,5 +2988,89 @@
"3": [], "3": [],
"4": [], "4": [],
"5": [] "5": []
},
"23030": {
"1": [
{
"PropertyType": "CriticalDamageBase",
"Value": {
"Value": 0.36
}
}
],
"2": [
{
"PropertyType": "CriticalDamageBase",
"Value": {
"Value": 0.42
}
}
],
"3": [
{
"PropertyType": "CriticalDamageBase",
"Value": {
"Value": 0.48
}
}
],
"4": [
{
"PropertyType": "CriticalDamageBase",
"Value": {
"Value": 0.54
}
}
],
"5": [
{
"PropertyType": "CriticalDamageBase",
"Value": {
"Value": 0.6
}
}
]
},
"23029": {
"1": [
{
"PropertyType": "StatusProbabilityBase",
"Value": {
"Value": 0.6
}
}
],
"2": [
{
"PropertyType": "StatusProbabilityBase",
"Value": {
"Value": 0.7
}
}
],
"3": [
{
"PropertyType": "StatusProbabilityBase",
"Value": {
"Value": 0.8
}
}
],
"4": [
{
"PropertyType": "StatusProbabilityBase",
"Value": {
"Value": 0.9
}
}
],
"5": [
{
"PropertyType": "StatusProbabilityBase",
"Value": {
"Value": 1
}
}
]
} }
} }

View File

@ -101,6 +101,9 @@
"23028": "YetHopeIsPriceless", "23028": "YetHopeIsPriceless",
"21044": "BoundlessChoreo", "21044": "BoundlessChoreo",
"21045": "AftertheCharmonyFall", "21045": "AftertheCharmonyFall",
"21046": "PoisedtoBloom",
"22002": "ForTomorrow'sJourney", "22002": "ForTomorrow'sJourney",
"23026": "FlowingNightglow" "23026": "FlowingNightglow",
"23030": "DanceatSunset",
"23029": "ThoseManySprings"
} }

View File

@ -101,6 +101,9 @@
"23028": "偏偏希望无价", "23028": "偏偏希望无价",
"21044": "无边曼舞", "21044": "无边曼舞",
"21045": "谐乐静默之后", "21045": "谐乐静默之后",
"21046": "芳华待灼",
"22002": "为了明日的旅途", "22002": "为了明日的旅途",
"23026": "夜色流光溢彩" "23026": "夜色流光溢彩",
"23030": "落日时起舞",
"23029": "那无数个春天"
} }

View File

@ -66,6 +66,7 @@
"21043": 4, "21043": 4,
"21044": 4, "21044": 4,
"21045": 4, "21045": 4,
"21046": 4,
"22000": 4, "22000": 4,
"22001": 4, "22001": 4,
"22002": 4, "22002": 4,
@ -98,6 +99,8 @@
"23026": 5, "23026": 5,
"23027": 5, "23027": 5,
"23028": 5, "23028": 5,
"23029": 5,
"23030": 5,
"24000": 5, "24000": 5,
"24001": 5, "24001": 5,
"24002": 5, "24002": 5,

View File

@ -1,55 +0,0 @@
{
"MaxHP": "生命值",
"Attack": "攻击力",
"Defence": "防御力",
"Speed": "速度",
"CriticalChance": "暴击率",
"CriticalDamage": "暴击伤害",
"BreakDamageAddedRatio": "击破特攻",
"BreakDamageAddedRatioBase": "击破特攻",
"HealRatio": "治疗量加成",
"MaxSP": "能量上限",
"SPRatio": "能量恢复效率",
"StatusProbability": "效果命中",
"StatusResistance": "效果抵抗",
"CriticalChanceBase": "暴击率",
"CriticalDamageBase": "暴击伤害",
"HealRatioBase": "治疗量加成",
"StanceBreakAddedRatio": "dev_失效字段",
"SPRatioBase": "能量恢复效率",
"StatusProbabilityBase": "效果命中",
"StatusResistanceBase": "效果抵抗",
"PhysicalAddedRatio": "物理属性伤害提高",
"PhysicalResistance": "物理属性抗性提高",
"FireAddedRatio": "火属性伤害提高",
"FireResistance": "火属性抗性提高",
"IceAddedRatio": "冰属性伤害提高",
"IceResistance": "冰属性抗性提高",
"ThunderAddedRatio": "雷属性伤害提高",
"ThunderResistance": "雷属性抗性提高",
"WindAddedRatio": "风属性伤害提高",
"WindResistance": "风属性抗性提高",
"QuantumAddedRatio": "量子属性伤害提高",
"QuantumResistance": "量子属性抗性提高",
"ImaginaryAddedRatio": "虚数属性伤害提高",
"ImaginaryResistance": "虚数属性抗性提高",
"BaseHP": "基础生命值提高<unbreak>#1[i]</unbreak>",
"HPDelta": "生命值",
"HPAddedRatio": "生命值百分比",
"BaseAttack": "基础攻击力提高<unbreak>#1[i]</unbreak>",
"AttackDelta": "攻击力",
"AttackAddedRatio": "攻击力百分比",
"BaseDefence": "基础防御力提高<unbreak>#1[i]</unbreak>",
"DefenceDelta": "防御力",
"DefenceAddedRatio": "防御力百分比",
"BaseSpeed": "速度",
"HealTakenRatio": "治疗量加成",
"PhysicalResistanceDelta": "物理属性抗性提高",
"FireResistanceDelta": "火属性抗性提高",
"IceResistanceDelta": "冰属性抗性提高",
"ThunderResistanceDelta": "雷属性抗性提高",
"WindResistanceDelta": "风属性抗性提高",
"QuantumResistanceDelta": "量子属性抗性提高",
"ImaginaryResistanceDelta": "虚数属性抗性提高",
"SpeedDelta": "速度"
}

View File

@ -9,7 +9,6 @@
"BreakDamageAddedRatioBase": "击破特攻", "BreakDamageAddedRatioBase": "击破特攻",
"HealRatio": "治疗量加成", "HealRatio": "治疗量加成",
"MaxSP": "能量上限", "MaxSP": "能量上限",
"SpecialMaxSP": "",
"SPRatio": "能量恢复效率", "SPRatio": "能量恢复效率",
"StatusProbability": "效果命中", "StatusProbability": "效果命中",
"StatusResistance": "效果抵抗", "StatusResistance": "效果抵抗",

View File

@ -1,238 +0,0 @@
{
"101": {
"2": {
"Property": "HealRatioBase",
"Value": 0.1
},
"4": {}
},
"102": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {
"Property": "SpeedAddedRatio",
"Value": 0.06
}
},
"103": {
"2": {
"Property": "DefenceAddedRatio",
"Value": 0.15
},
"4": {}
},
"104": {
"2": {
"Property": "IceAddedRatio",
"Value": 0.1
},
"4": {}
},
"105": {
"2": {
"Property": "PhysicalAddedRatio",
"Value": 0.1
},
"4": {}
},
"106": {
"2": {},
"4": {}
},
"107": {
"2": {
"Property": "FireAddedRatio",
"Value": 0.1
},
"4": {}
},
"108": {
"2": {
"Property": "QuantumAddedRatio",
"Value": 0.1
},
"4": {}
},
"109": {
"2": {
"Property": "ThunderAddedRatio",
"Value": 0.1
},
"4": {}
},
"110": {
"2": {
"Property": "WindAddedRatio",
"Value": 0.1
},
"4": {}
},
"111": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
}
},
"112": {
"2": {
"Property": "ImaginaryAddedRatio",
"Value": 0.1
},
"4": {}
},
"301": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"302": {
"2": {
"Property": "HPAddedRatio",
"Value": 0.12
}
},
"303": {
"2": {
"Property": "StatusProbabilityBase",
"Value": 0.1
}
},
"304": {
"2": {
"Property": "DefenceAddedRatio",
"Value": 0.15
}
},
"305": {
"2": {
"Property": "CriticalDamageBase",
"Value": 0.16
}
},
"306": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.08
}
},
"307": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
}
},
"308": {
"2": {
"Property": "SPRatioBase",
"Value": 0.05
}
},
"309": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.08
}
},
"310": {
"2": {
"Property": "StatusResistanceBase",
"Value": 0.1
}
},
"113": {
"2": {
"Property": "HPAddedRatio",
"Value": 0.12
},
"4": {}
},
"114": {
"2": {
"Property": "SpeedAddedRatio",
"Value": 0.06
},
"4": {}
},
"115": {
"2": {},
"4": {}
},
"116": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {}
},
"311": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"312": {
"2": {
"Property": "SPRatioBase",
"Value": 0.05
}
},
"117": {
"2": {},
"4": {
"Property": "CriticalChanceBase",
"Value": 0.04
}
},
"118": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {}
},
"313": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.04
}
},
"314": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"119": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {}
},
"120": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {
"Property": "CriticalChanceBase",
"Value": 0.06
}
},
"315": {
"2": {}
},
"316": {
"2": {
"Property": "SpeedAddedRatio",
"Value": 0.06
}
}
}

View File

@ -0,0 +1,238 @@
{
"101": {
"2": {
"Property": "HealRatioBase",
"Value": 0.1
},
"4": {}
},
"102": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {
"Property": "SpeedAddedRatio",
"Value": 0.06
}
},
"103": {
"2": {
"Property": "DefenceAddedRatio",
"Value": 0.15
},
"4": {}
},
"104": {
"2": {
"Property": "IceAddedRatio",
"Value": 0.1
},
"4": {}
},
"105": {
"2": {
"Property": "PhysicalAddedRatio",
"Value": 0.1
},
"4": {}
},
"106": {
"2": {},
"4": {}
},
"107": {
"2": {
"Property": "FireAddedRatio",
"Value": 0.1
},
"4": {}
},
"108": {
"2": {
"Property": "QuantumAddedRatio",
"Value": 0.1
},
"4": {}
},
"109": {
"2": {
"Property": "ThunderAddedRatio",
"Value": 0.1
},
"4": {}
},
"110": {
"2": {
"Property": "WindAddedRatio",
"Value": 0.1
},
"4": {}
},
"111": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
}
},
"112": {
"2": {
"Property": "ImaginaryAddedRatio",
"Value": 0.1
},
"4": {}
},
"301": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"302": {
"2": {
"Property": "HPAddedRatio",
"Value": 0.12
}
},
"303": {
"2": {
"Property": "StatusProbabilityBase",
"Value": 0.1
}
},
"304": {
"2": {
"Property": "DefenceAddedRatio",
"Value": 0.15
}
},
"305": {
"2": {
"Property": "CriticalDamageBase",
"Value": 0.16
}
},
"306": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.08
}
},
"307": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
}
},
"308": {
"2": {
"Property": "SPRatioBase",
"Value": 0.05
}
},
"309": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.08
}
},
"310": {
"2": {
"Property": "StatusResistanceBase",
"Value": 0.1
}
},
"113": {
"2": {
"Property": "HPAddedRatio",
"Value": 0.12
},
"4": {}
},
"114": {
"2": {
"Property": "SpeedAddedRatio",
"Value": 0.06
},
"4": {}
},
"115": {
"2": {},
"4": {}
},
"116": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {}
},
"311": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"312": {
"2": {
"Property": "SPRatioBase",
"Value": 0.05
}
},
"117": {
"2": {},
"4": {
"Property": "CriticalChanceBase",
"Value": 0.04
}
},
"118": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {}
},
"313": {
"2": {
"Property": "CriticalChanceBase",
"Value": 0.04
}
},
"314": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
}
},
"119": {
"2": {
"Property": "BreakDamageAddedRatioBase",
"Value": 0.16
},
"4": {}
},
"120": {
"2": {
"Property": "AttackAddedRatio",
"Value": 0.12
},
"4": {
"Property": "CriticalChanceBase",
"Value": 0.06
}
},
"315": {
"2": {}
},
"316": {
"2": {
"Property": "SpeedAddedRatio",
"Value": 0.06
}
}
}

View File

@ -36,6 +36,9 @@
"1214": "Quantum", "1214": "Quantum",
"1215": "Physical", "1215": "Physical",
"1217": "Wind", "1217": "Wind",
"1218": "Fire",
"1221": "Physical",
"1224": "Imaginary",
"1301": "Fire", "1301": "Fire",
"1302": "Physical", "1302": "Physical",
"1303": "Ice", "1303": "Ice",

View File

@ -36,6 +36,9 @@
"1214": "Xueyi", "1214": "Xueyi",
"1215": "Hanya", "1215": "Hanya",
"1217": "Huohuo", "1217": "Huohuo",
"1218": "Jiaoqiu",
"1221": "Yunli",
"1224": "March7th",
"1301": "Gallagher", "1301": "Gallagher",
"1302": "Argenti", "1302": "Argenti",
"1303": "RuanMei", "1303": "RuanMei",

View File

@ -36,6 +36,9 @@
"1214": "雪衣", "1214": "雪衣",
"1215": "寒鸦", "1215": "寒鸦",
"1217": "藿藿", "1217": "藿藿",
"1218": "椒丘",
"1221": "云璃",
"1224": "三月七",
"1301": "加拉赫", "1301": "加拉赫",
"1302": "银枝", "1302": "银枝",
"1303": "阮•梅", "1303": "阮•梅",

View File

@ -1,58 +0,0 @@
{
"1001": "4",
"1002": "4",
"1003": "5",
"1004": "5",
"1005": "5",
"1006": "5",
"1008": "4",
"1009": "4",
"1013": "4",
"1101": "5",
"1102": "5",
"1103": "4",
"1104": "5",
"1105": "4",
"1106": "4",
"1107": "5",
"1108": "4",
"1109": "4",
"1110": "4",
"1111": "4",
"1112": "5",
"1201": "4",
"1202": "4",
"1203": "5",
"1204": "5",
"1205": "5",
"1206": "4",
"1207": "4",
"1208": "5",
"1209": "5",
"1210": "4",
"1211": "5",
"1212": "5",
"1213": "5",
"1214": "4",
"1215": "4",
"1217": "5",
"1301": "4",
"1302": "5",
"1303": "5",
"1304": "5",
"1305": "5",
"1306": "5",
"1307": "5",
"1308": "5",
"1309": "5",
"1310": "5",
"1312": "4",
"1314": "5",
"1315": "5",
"8001": "5",
"8002": "5",
"8003": "5",
"8004": "5",
"8005": "5",
"8006": "5"
}

View File

@ -36,6 +36,9 @@
"1214": "4", "1214": "4",
"1215": "4", "1215": "4",
"1217": "5", "1217": "5",
"1218": "5",
"1221": "5",
"1224": "4",
"1301": "4", "1301": "4",
"1302": "5", "1302": "5",
"1303": "5", "1303": "5",

View File

@ -919,6 +919,82 @@
} }
], ],
"121706": [], "121706": [],
"121801": [],
"121802": [],
"121803": [
{
"id": "121802",
"num": 2
},
{
"id": "121801",
"num": 1
}
],
"121804": [],
"121805": [
{
"id": "121803",
"num": 2
},
{
"id": "121804",
"num": 2
}
],
"121806": [],
"122101": [],
"122102": [],
"122103": [
{
"id": "122103",
"num": 2
},
{
"id": "122101",
"num": 1
}
],
"122104": [],
"122105": [
{
"id": "122102",
"num": 2
},
{
"id": "122104",
"num": 2
}
],
"122106": [],
"122401": [],
"122402": [],
"122403": [
{
"id": "122402",
"num": 2
},
{
"id": "122401",
"num": 1
},
{
"id": "122408",
"num": 1
}
],
"122404": [],
"122405": [
{
"id": "122403",
"num": 2
},
{
"id": "122404",
"num": 2
}
],
"122406": [],
"130101": [], "130101": [],
"130102": [], "130102": [],
"130103": [ "130103": [

View File

@ -221,6 +221,24 @@
"121704": "坐卧不离,争拗难宁", "121704": "坐卧不离,争拗难宁",
"121705": "降妖捉鬼,十王敕令", "121705": "降妖捉鬼,十王敕令",
"121706": "同休共戚,相须而行", "121706": "同休共戚,相须而行",
"121801": "五味五走,生熟有定",
"121802": "爽口作疾,厚味措毒",
"121803": "和合之妙,敌不及拒",
"121804": "藏腑和平,血气资荣",
"121805": "明争天地,暗斗变击",
"121806": "九沸九变,火为之纪",
"122101": "沉锋离垢",
"122102": "初芒破生",
"122103": "九尺运斤",
"122104": "大匠击橐",
"122105": "恒兵匪石",
"122106": "剑胆琴心",
"122401": "初花学剑动星芒",
"122402": "白刃耀雪舞骇浪",
"122403": "头脑机灵本领强",
"122404": "龙飞凤舞不窝囊",
"122405": "多练武术少吃糖",
"122406": "天下第一本姑娘",
"130101": "盐与犬", "130101": "盐与犬",
"130102": "狮子之尾", "130102": "狮子之尾",
"130103": "逝者的新生", "130103": "逝者的新生",

View File

@ -358,5 +358,24 @@
"130603": "Ultra", "130603": "Ultra",
"130604": "", "130604": "",
"130606": "MazeNormal", "130606": "MazeNormal",
"130607": "Maze" "130607": "Maze",
} "121801": "Normal",
"121802": "BPSkill",
"121803": "Ultra",
"121804": "",
"121806": "MazeNormal",
"121807": "Maze",
"122401": "Normal",
"122408": "Normal",
"122402": "BPSkill",
"122403": "Ultra",
"122404": "",
"122406": "MazeNormal",
"122407": "Maze",
"122101": "Normal",
"122102": "BPSkill",
"122103": "Ultra",
"122104": "",
"122106": "MazeNormal",
"122107": "Maze"
}

View File

@ -358,5 +358,24 @@
"130603": "一人千役", "130603": "一人千役",
"130604": "叙述性诡计", "130604": "叙述性诡计",
"130606": "攻击", "130606": "攻击",
"130607": "不可靠叙事者" "130607": "不可靠叙事者",
"121801": "仁火攻心",
"121802": "燔燎急袭",
"121803": "鼎阵妙法,奇正相生",
"121804": "四示八权,纤滋精味",
"121806": "攻击",
"121807": "旺火却乱",
"122401": "荡涤妖邪琉璃剑",
"122408": "一扎眉攒,二扎心",
"122402": "师父,请喝茶!",
"122403": "盖世女侠三月七",
"122404": "师父,我悟了!",
"122406": "攻击",
"122407": "一气化三餐",
"122101": "翻风转日",
"122102": "飞铗震赫",
"122103": "剑为地纪,刃惊天宗",
"122104": "闪铄",
"122106": "攻击",
"122107": "后发先至"
} }

View File

@ -358,5 +358,24 @@
"130603": "辅助", "130603": "辅助",
"130604": "辅助", "130604": "辅助",
"130606": "", "130606": "",
"130607": "辅助" "130607": "辅助",
"121801": "单攻",
"121802": "扩散",
"121803": "群攻",
"121804": "妨害",
"121806": "",
"121807": "妨害",
"122401": "单攻",
"122408": "单攻",
"122402": "辅助",
"122403": "单攻",
"122404": "强化",
"122406": "",
"122407": "强化",
"122101": "单攻",
"122102": "扩散",
"122103": "强化",
"122104": "扩散",
"122106": "",
"122107": "强化"
} }

View File

@ -1 +1 @@
StarRail_version = "2.3.0" StarRail_version = "2.4.0"

View File

@ -5,7 +5,7 @@ from starrail_damage_cal.cal_damage import DamageCal
async def test_get_damage_data_by_uid() -> None: async def test_get_damage_data_by_uid() -> None:
data = await DamageCal.get_all_damage_data_by_uid(uid="121006662") data = await DamageCal.get_all_damage_data_by_uid(uid="100404677")
if isinstance(data, Union[List, dict]): if isinstance(data, Union[List, dict]):
print(json.dumps(data, ensure_ascii=False, indent=4)) print(json.dumps(data, ensure_ascii=False, indent=4))