haiway 0.10.15__py3-none-any.whl → 0.10.17__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.
- haiway/__init__.py +111 -0
- haiway/context/__init__.py +27 -0
- haiway/context/access.py +615 -0
- haiway/context/disposables.py +78 -0
- haiway/context/identifier.py +92 -0
- haiway/context/logging.py +176 -0
- haiway/context/metrics.py +165 -0
- haiway/context/state.py +113 -0
- haiway/context/tasks.py +64 -0
- haiway/context/types.py +12 -0
- haiway/helpers/__init__.py +21 -0
- haiway/helpers/asynchrony.py +225 -0
- haiway/helpers/caching.py +326 -0
- haiway/helpers/metrics.py +459 -0
- haiway/helpers/retries.py +223 -0
- haiway/helpers/throttling.py +133 -0
- haiway/helpers/timeouted.py +112 -0
- haiway/helpers/tracing.py +137 -0
- haiway/py.typed +0 -0
- haiway/state/__init__.py +12 -0
- haiway/state/attributes.py +747 -0
- haiway/state/path.py +542 -0
- haiway/state/requirement.py +229 -0
- haiway/state/structure.py +414 -0
- haiway/state/validation.py +468 -0
- haiway/types/__init__.py +14 -0
- haiway/types/default.py +108 -0
- haiway/types/frozen.py +5 -0
- haiway/types/missing.py +95 -0
- haiway/utils/__init__.py +28 -0
- haiway/utils/always.py +61 -0
- haiway/utils/collections.py +185 -0
- haiway/utils/env.py +230 -0
- haiway/utils/freezing.py +28 -0
- haiway/utils/logs.py +57 -0
- haiway/utils/mimic.py +77 -0
- haiway/utils/noop.py +24 -0
- haiway/utils/queue.py +82 -0
- {haiway-0.10.15.dist-info → haiway-0.10.17.dist-info}/METADATA +1 -1
- haiway-0.10.17.dist-info/RECORD +42 -0
- haiway-0.10.15.dist-info/RECORD +0 -4
- {haiway-0.10.15.dist-info → haiway-0.10.17.dist-info}/WHEEL +0 -0
- {haiway-0.10.15.dist-info → haiway-0.10.17.dist-info}/licenses/LICENSE +0 -0
haiway/__init__.py
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
from haiway.context import (
|
2
|
+
Disposable,
|
3
|
+
Disposables,
|
4
|
+
MetricsContext,
|
5
|
+
MetricsHandler,
|
6
|
+
MetricsReading,
|
7
|
+
MetricsRecording,
|
8
|
+
MetricsScopeEntering,
|
9
|
+
MetricsScopeExiting,
|
10
|
+
MissingContext,
|
11
|
+
MissingState,
|
12
|
+
ScopeIdentifier,
|
13
|
+
ctx,
|
14
|
+
)
|
15
|
+
from haiway.helpers import (
|
16
|
+
ArgumentsTrace,
|
17
|
+
MetricsHolder,
|
18
|
+
MetricsLogger,
|
19
|
+
ResultTrace,
|
20
|
+
asynchronous,
|
21
|
+
cache,
|
22
|
+
retry,
|
23
|
+
throttle,
|
24
|
+
timeout,
|
25
|
+
traced,
|
26
|
+
wrap_async,
|
27
|
+
)
|
28
|
+
from haiway.state import AttributePath, AttributeRequirement, State
|
29
|
+
from haiway.types import (
|
30
|
+
MISSING,
|
31
|
+
Default,
|
32
|
+
DefaultValue,
|
33
|
+
Missing,
|
34
|
+
frozenlist,
|
35
|
+
is_missing,
|
36
|
+
not_missing,
|
37
|
+
when_missing,
|
38
|
+
)
|
39
|
+
from haiway.utils import (
|
40
|
+
AsyncQueue,
|
41
|
+
always,
|
42
|
+
as_dict,
|
43
|
+
as_list,
|
44
|
+
as_set,
|
45
|
+
as_tuple,
|
46
|
+
async_always,
|
47
|
+
async_noop,
|
48
|
+
freeze,
|
49
|
+
getenv_bool,
|
50
|
+
getenv_float,
|
51
|
+
getenv_int,
|
52
|
+
getenv_str,
|
53
|
+
load_env,
|
54
|
+
mimic_function,
|
55
|
+
noop,
|
56
|
+
setup_logging,
|
57
|
+
)
|
58
|
+
|
59
|
+
__all__ = [
|
60
|
+
"MISSING",
|
61
|
+
"ArgumentsTrace",
|
62
|
+
"AsyncQueue",
|
63
|
+
"AttributePath",
|
64
|
+
"AttributeRequirement",
|
65
|
+
"Default",
|
66
|
+
"DefaultValue",
|
67
|
+
"Disposable",
|
68
|
+
"Disposables",
|
69
|
+
"MetricsContext",
|
70
|
+
"MetricsHandler",
|
71
|
+
"MetricsHolder",
|
72
|
+
"MetricsLogger",
|
73
|
+
"MetricsReading",
|
74
|
+
"MetricsRecording",
|
75
|
+
"MetricsScopeEntering",
|
76
|
+
"MetricsScopeExiting",
|
77
|
+
"Missing",
|
78
|
+
"MissingContext",
|
79
|
+
"MissingState",
|
80
|
+
"ResultTrace",
|
81
|
+
"ScopeIdentifier",
|
82
|
+
"State",
|
83
|
+
"always",
|
84
|
+
"as_dict",
|
85
|
+
"as_list",
|
86
|
+
"as_set",
|
87
|
+
"as_tuple",
|
88
|
+
"async_always",
|
89
|
+
"async_noop",
|
90
|
+
"asynchronous",
|
91
|
+
"cache",
|
92
|
+
"ctx",
|
93
|
+
"freeze",
|
94
|
+
"frozenlist",
|
95
|
+
"getenv_bool",
|
96
|
+
"getenv_float",
|
97
|
+
"getenv_int",
|
98
|
+
"getenv_str",
|
99
|
+
"is_missing",
|
100
|
+
"load_env",
|
101
|
+
"mimic_function",
|
102
|
+
"noop",
|
103
|
+
"not_missing",
|
104
|
+
"retry",
|
105
|
+
"setup_logging",
|
106
|
+
"throttle",
|
107
|
+
"timeout",
|
108
|
+
"traced",
|
109
|
+
"when_missing",
|
110
|
+
"wrap_async",
|
111
|
+
]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
from haiway.context.access import ctx
|
2
|
+
from haiway.context.disposables import Disposable, Disposables
|
3
|
+
from haiway.context.identifier import ScopeIdentifier
|
4
|
+
from haiway.context.metrics import (
|
5
|
+
MetricsContext,
|
6
|
+
MetricsHandler,
|
7
|
+
MetricsReading,
|
8
|
+
MetricsRecording,
|
9
|
+
MetricsScopeEntering,
|
10
|
+
MetricsScopeExiting,
|
11
|
+
)
|
12
|
+
from haiway.context.types import MissingContext, MissingState
|
13
|
+
|
14
|
+
__all__ = [
|
15
|
+
"Disposable",
|
16
|
+
"Disposables",
|
17
|
+
"MetricsContext",
|
18
|
+
"MetricsHandler",
|
19
|
+
"MetricsReading",
|
20
|
+
"MetricsRecording",
|
21
|
+
"MetricsScopeEntering",
|
22
|
+
"MetricsScopeExiting",
|
23
|
+
"MissingContext",
|
24
|
+
"MissingState",
|
25
|
+
"ScopeIdentifier",
|
26
|
+
"ctx",
|
27
|
+
]
|