ezKit 3.0.63__tar.gz → 3.0.64__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ezkit-3.0.63/ezKit.egg-info → ezkit-3.0.64}/PKG-INFO +1 -1
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/utils.py +15 -0
- {ezkit-3.0.63 → ezkit-3.0.64/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-3.0.63 → ezkit-3.0.64}/setup.py +1 -1
- {ezkit-3.0.63 → ezkit-3.0.64}/LICENSE +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/MANIFEST.in +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/README.md +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/__init__.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/bandwagon.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/cipher.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/database.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/fastapix.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/http.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/markdown_to_html.template +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/markdownx.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/sendemail.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit/stock.py +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit.egg-info/requires.txt +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/pyproject.toml +0 -0
- {ezkit-3.0.63 → ezkit-3.0.64}/setup.cfg +0 -0
|
@@ -5,11 +5,13 @@ import subprocess
|
|
|
5
5
|
import time
|
|
6
6
|
import tomllib
|
|
7
7
|
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
|
|
8
|
+
from copy import deepcopy
|
|
8
9
|
from datetime import date, datetime, time as datetime_time, tzinfo
|
|
9
10
|
from decimal import Decimal
|
|
10
11
|
from functools import wraps
|
|
11
12
|
from ipaddress import IPv4Address, IPv6Address
|
|
12
13
|
from itertools import islice
|
|
14
|
+
from operator import itemgetter
|
|
13
15
|
from os import environ
|
|
14
16
|
from pathlib import Path
|
|
15
17
|
from secrets import choice
|
|
@@ -702,3 +704,16 @@ def split_dict(data: dict, keys: list) -> tuple[dict[Any, Any], dict[Any, Any]]
|
|
|
702
704
|
logger.error(e)
|
|
703
705
|
|
|
704
706
|
return None
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
def sort_dicts(dicts: list[dict], key: str, *, reverse: bool = False) -> list[dict] | None:
|
|
710
|
+
"""字典列表排序"""
|
|
711
|
+
try:
|
|
712
|
+
new_dicts = deepcopy(dicts)
|
|
713
|
+
return sorted(new_dicts, key=itemgetter(key), reverse=reverse)
|
|
714
|
+
except Exception as e:
|
|
715
|
+
if DEBUG:
|
|
716
|
+
logger.exception(e)
|
|
717
|
+
else:
|
|
718
|
+
logger.error(e)
|
|
719
|
+
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|