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.
Files changed (43) hide show
  1. haiway/__init__.py +111 -0
  2. haiway/context/__init__.py +27 -0
  3. haiway/context/access.py +615 -0
  4. haiway/context/disposables.py +78 -0
  5. haiway/context/identifier.py +92 -0
  6. haiway/context/logging.py +176 -0
  7. haiway/context/metrics.py +165 -0
  8. haiway/context/state.py +113 -0
  9. haiway/context/tasks.py +64 -0
  10. haiway/context/types.py +12 -0
  11. haiway/helpers/__init__.py +21 -0
  12. haiway/helpers/asynchrony.py +225 -0
  13. haiway/helpers/caching.py +326 -0
  14. haiway/helpers/metrics.py +459 -0
  15. haiway/helpers/retries.py +223 -0
  16. haiway/helpers/throttling.py +133 -0
  17. haiway/helpers/timeouted.py +112 -0
  18. haiway/helpers/tracing.py +137 -0
  19. haiway/py.typed +0 -0
  20. haiway/state/__init__.py +12 -0
  21. haiway/state/attributes.py +747 -0
  22. haiway/state/path.py +542 -0
  23. haiway/state/requirement.py +229 -0
  24. haiway/state/structure.py +414 -0
  25. haiway/state/validation.py +468 -0
  26. haiway/types/__init__.py +14 -0
  27. haiway/types/default.py +108 -0
  28. haiway/types/frozen.py +5 -0
  29. haiway/types/missing.py +95 -0
  30. haiway/utils/__init__.py +28 -0
  31. haiway/utils/always.py +61 -0
  32. haiway/utils/collections.py +185 -0
  33. haiway/utils/env.py +230 -0
  34. haiway/utils/freezing.py +28 -0
  35. haiway/utils/logs.py +57 -0
  36. haiway/utils/mimic.py +77 -0
  37. haiway/utils/noop.py +24 -0
  38. haiway/utils/queue.py +82 -0
  39. {haiway-0.10.15.dist-info → haiway-0.10.17.dist-info}/METADATA +1 -1
  40. haiway-0.10.17.dist-info/RECORD +42 -0
  41. haiway-0.10.15.dist-info/RECORD +0 -4
  42. {haiway-0.10.15.dist-info → haiway-0.10.17.dist-info}/WHEEL +0 -0
  43. {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
+ ]