pythonwrench 0.6.4__py3-none-any.whl
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.
- pythonwrench/__init__.py +490 -0
- pythonwrench/__main__.py +7 -0
- pythonwrench/_core.py +192 -0
- pythonwrench/abc.py +30 -0
- pythonwrench/argparse/__init__.py +81 -0
- pythonwrench/argparse/dataclass_.py +284 -0
- pythonwrench/argparse/parsers.py +619 -0
- pythonwrench/cast.py +247 -0
- pythonwrench/checksum.py +427 -0
- pythonwrench/collections/__init__.py +104 -0
- pythonwrench/collections/collections.py +900 -0
- pythonwrench/collections/prop.py +104 -0
- pythonwrench/collections/reducers.py +330 -0
- pythonwrench/concurrent.py +73 -0
- pythonwrench/csv.py +12 -0
- pythonwrench/dataclasses.py +117 -0
- pythonwrench/datetime.py +17 -0
- pythonwrench/difflib.py +39 -0
- pythonwrench/disk_cache.py +615 -0
- pythonwrench/entrypoints/info.py +44 -0
- pythonwrench/entrypoints/safe_rmdir.py +98 -0
- pythonwrench/entrypoints/tree.py +113 -0
- pythonwrench/enum.py +55 -0
- pythonwrench/functools.py +234 -0
- pythonwrench/hashlib.py +95 -0
- pythonwrench/importlib.py +243 -0
- pythonwrench/inspect.py +69 -0
- pythonwrench/json.py +12 -0
- pythonwrench/jsonl.py +12 -0
- pythonwrench/logging.py +252 -0
- pythonwrench/math.py +107 -0
- pythonwrench/os.py +226 -0
- pythonwrench/pickle.py +12 -0
- pythonwrench/random.py +60 -0
- pythonwrench/re.py +139 -0
- pythonwrench/semver.py +406 -0
- pythonwrench/serialization/__init__.py +70 -0
- pythonwrench/serialization/_core.py +70 -0
- pythonwrench/serialization/csv.py +493 -0
- pythonwrench/serialization/json.py +178 -0
- pythonwrench/serialization/jsonl.py +215 -0
- pythonwrench/serialization/pickle.py +186 -0
- pythonwrench/time.py +34 -0
- pythonwrench/typing/__init__.py +125 -0
- pythonwrench/typing/checks.py +551 -0
- pythonwrench/typing/classes.py +251 -0
- pythonwrench/warnings.py +118 -0
- pythonwrench-0.6.4.dist-info/METADATA +242 -0
- pythonwrench-0.6.4.dist-info/RECORD +52 -0
- pythonwrench-0.6.4.dist-info/WHEEL +4 -0
- pythonwrench-0.6.4.dist-info/entry_points.txt +10 -0
- pythonwrench-0.6.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
import lazy_loader as lazy # type: ignore
|
|
8
|
+
except ImportError:
|
|
9
|
+
lazy = None
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING or lazy is None:
|
|
13
|
+
from .collections import (
|
|
14
|
+
SizedGenerator,
|
|
15
|
+
contained,
|
|
16
|
+
dict_list_to_list_dict,
|
|
17
|
+
dump_dict,
|
|
18
|
+
duplicate_list,
|
|
19
|
+
filter_iterable,
|
|
20
|
+
find,
|
|
21
|
+
flat_dict_of_dict,
|
|
22
|
+
flat_list_of_list,
|
|
23
|
+
flatten,
|
|
24
|
+
intersect_lists,
|
|
25
|
+
list_dict_to_dict_list,
|
|
26
|
+
recursive_generator,
|
|
27
|
+
shuffled,
|
|
28
|
+
sorted_dict,
|
|
29
|
+
unflat_dict_of_dict,
|
|
30
|
+
unflat_list_of_list,
|
|
31
|
+
union_dicts,
|
|
32
|
+
union_lists,
|
|
33
|
+
unzip,
|
|
34
|
+
)
|
|
35
|
+
from .prop import (
|
|
36
|
+
all_eq,
|
|
37
|
+
all_ne,
|
|
38
|
+
is_full,
|
|
39
|
+
is_sorted,
|
|
40
|
+
is_unique,
|
|
41
|
+
)
|
|
42
|
+
from .reducers import (
|
|
43
|
+
intersect,
|
|
44
|
+
prod,
|
|
45
|
+
reduce_add,
|
|
46
|
+
reduce_and,
|
|
47
|
+
reduce_matmul,
|
|
48
|
+
reduce_mul,
|
|
49
|
+
reduce_or,
|
|
50
|
+
sum,
|
|
51
|
+
union,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
else:
|
|
55
|
+
__getattr__, __dir__, __all__ = lazy.attach(
|
|
56
|
+
__name__,
|
|
57
|
+
submodules=[
|
|
58
|
+
"collections",
|
|
59
|
+
"prop",
|
|
60
|
+
"reducers",
|
|
61
|
+
],
|
|
62
|
+
submod_attrs={
|
|
63
|
+
"collections": [
|
|
64
|
+
"SizedGenerator",
|
|
65
|
+
"contained",
|
|
66
|
+
"dict_list_to_list_dict",
|
|
67
|
+
"dump_dict",
|
|
68
|
+
"duplicate_list",
|
|
69
|
+
"filter_iterable",
|
|
70
|
+
"find",
|
|
71
|
+
"flat_dict_of_dict",
|
|
72
|
+
"flat_list_of_list",
|
|
73
|
+
"flatten",
|
|
74
|
+
"intersect_lists",
|
|
75
|
+
"list_dict_to_dict_list",
|
|
76
|
+
"recursive_generator",
|
|
77
|
+
"shuffled",
|
|
78
|
+
"sorted_dict",
|
|
79
|
+
"unflat_dict_of_dict",
|
|
80
|
+
"unflat_list_of_list",
|
|
81
|
+
"union_dicts",
|
|
82
|
+
"union_lists",
|
|
83
|
+
"unzip",
|
|
84
|
+
],
|
|
85
|
+
"prop": [
|
|
86
|
+
"all_eq",
|
|
87
|
+
"all_ne",
|
|
88
|
+
"is_full",
|
|
89
|
+
"is_sorted",
|
|
90
|
+
"is_unique",
|
|
91
|
+
],
|
|
92
|
+
"reducers": [
|
|
93
|
+
"intersect",
|
|
94
|
+
"prod",
|
|
95
|
+
"reduce_add",
|
|
96
|
+
"reduce_and",
|
|
97
|
+
"reduce_matmul",
|
|
98
|
+
"reduce_mul",
|
|
99
|
+
"reduce_or",
|
|
100
|
+
"sum",
|
|
101
|
+
"union",
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
)
|