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.
Files changed (52) hide show
  1. pythonwrench/__init__.py +490 -0
  2. pythonwrench/__main__.py +7 -0
  3. pythonwrench/_core.py +192 -0
  4. pythonwrench/abc.py +30 -0
  5. pythonwrench/argparse/__init__.py +81 -0
  6. pythonwrench/argparse/dataclass_.py +284 -0
  7. pythonwrench/argparse/parsers.py +619 -0
  8. pythonwrench/cast.py +247 -0
  9. pythonwrench/checksum.py +427 -0
  10. pythonwrench/collections/__init__.py +104 -0
  11. pythonwrench/collections/collections.py +900 -0
  12. pythonwrench/collections/prop.py +104 -0
  13. pythonwrench/collections/reducers.py +330 -0
  14. pythonwrench/concurrent.py +73 -0
  15. pythonwrench/csv.py +12 -0
  16. pythonwrench/dataclasses.py +117 -0
  17. pythonwrench/datetime.py +17 -0
  18. pythonwrench/difflib.py +39 -0
  19. pythonwrench/disk_cache.py +615 -0
  20. pythonwrench/entrypoints/info.py +44 -0
  21. pythonwrench/entrypoints/safe_rmdir.py +98 -0
  22. pythonwrench/entrypoints/tree.py +113 -0
  23. pythonwrench/enum.py +55 -0
  24. pythonwrench/functools.py +234 -0
  25. pythonwrench/hashlib.py +95 -0
  26. pythonwrench/importlib.py +243 -0
  27. pythonwrench/inspect.py +69 -0
  28. pythonwrench/json.py +12 -0
  29. pythonwrench/jsonl.py +12 -0
  30. pythonwrench/logging.py +252 -0
  31. pythonwrench/math.py +107 -0
  32. pythonwrench/os.py +226 -0
  33. pythonwrench/pickle.py +12 -0
  34. pythonwrench/random.py +60 -0
  35. pythonwrench/re.py +139 -0
  36. pythonwrench/semver.py +406 -0
  37. pythonwrench/serialization/__init__.py +70 -0
  38. pythonwrench/serialization/_core.py +70 -0
  39. pythonwrench/serialization/csv.py +493 -0
  40. pythonwrench/serialization/json.py +178 -0
  41. pythonwrench/serialization/jsonl.py +215 -0
  42. pythonwrench/serialization/pickle.py +186 -0
  43. pythonwrench/time.py +34 -0
  44. pythonwrench/typing/__init__.py +125 -0
  45. pythonwrench/typing/checks.py +551 -0
  46. pythonwrench/typing/classes.py +251 -0
  47. pythonwrench/warnings.py +118 -0
  48. pythonwrench-0.6.4.dist-info/METADATA +242 -0
  49. pythonwrench-0.6.4.dist-info/RECORD +52 -0
  50. pythonwrench-0.6.4.dist-info/WHEEL +4 -0
  51. pythonwrench-0.6.4.dist-info/entry_points.txt +10 -0
  52. 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
+ )