ez-a-sync 0.32.29__cp310-cp310-win32.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.
Potentially problematic release.
This version of ez-a-sync might be problematic. Click here for more details.
- a_sync/ENVIRONMENT_VARIABLES.py +42 -0
- a_sync/__init__.pxd +2 -0
- a_sync/__init__.py +145 -0
- a_sync/_smart.c +22803 -0
- a_sync/_smart.cp310-win32.pyd +0 -0
- a_sync/_smart.pxd +2 -0
- a_sync/_smart.pyi +202 -0
- a_sync/_smart.pyx +674 -0
- a_sync/_typing.py +258 -0
- a_sync/a_sync/__init__.py +60 -0
- a_sync/a_sync/_descriptor.c +20528 -0
- a_sync/a_sync/_descriptor.cp310-win32.pyd +0 -0
- a_sync/a_sync/_descriptor.pyi +33 -0
- a_sync/a_sync/_descriptor.pyx +422 -0
- a_sync/a_sync/_flags.c +6074 -0
- a_sync/a_sync/_flags.cp310-win32.pyd +0 -0
- a_sync/a_sync/_flags.pxd +3 -0
- a_sync/a_sync/_flags.pyx +92 -0
- a_sync/a_sync/_helpers.c +14521 -0
- a_sync/a_sync/_helpers.cp310-win32.pyd +0 -0
- a_sync/a_sync/_helpers.pxd +3 -0
- a_sync/a_sync/_helpers.pyi +10 -0
- a_sync/a_sync/_helpers.pyx +167 -0
- a_sync/a_sync/_kwargs.c +12194 -0
- a_sync/a_sync/_kwargs.cp310-win32.pyd +0 -0
- a_sync/a_sync/_kwargs.pxd +2 -0
- a_sync/a_sync/_kwargs.pyx +64 -0
- a_sync/a_sync/_meta.py +210 -0
- a_sync/a_sync/abstract.c +12411 -0
- a_sync/a_sync/abstract.cp310-win32.pyd +0 -0
- a_sync/a_sync/abstract.pyi +141 -0
- a_sync/a_sync/abstract.pyx +221 -0
- a_sync/a_sync/base.c +14932 -0
- a_sync/a_sync/base.cp310-win32.pyd +0 -0
- a_sync/a_sync/base.pyi +60 -0
- a_sync/a_sync/base.pyx +271 -0
- a_sync/a_sync/config.py +168 -0
- a_sync/a_sync/decorator.py +651 -0
- a_sync/a_sync/flags.c +5272 -0
- a_sync/a_sync/flags.cp310-win32.pyd +0 -0
- a_sync/a_sync/flags.pxd +72 -0
- a_sync/a_sync/flags.pyi +74 -0
- a_sync/a_sync/flags.pyx +72 -0
- a_sync/a_sync/function.c +37846 -0
- a_sync/a_sync/function.cp310-win32.pyd +0 -0
- a_sync/a_sync/function.pxd +28 -0
- a_sync/a_sync/function.pyi +571 -0
- a_sync/a_sync/function.pyx +1381 -0
- a_sync/a_sync/method.c +29774 -0
- a_sync/a_sync/method.cp310-win32.pyd +0 -0
- a_sync/a_sync/method.pxd +9 -0
- a_sync/a_sync/method.pyi +525 -0
- a_sync/a_sync/method.pyx +1023 -0
- a_sync/a_sync/modifiers/__init__.pxd +1 -0
- a_sync/a_sync/modifiers/__init__.py +101 -0
- a_sync/a_sync/modifiers/cache/__init__.py +160 -0
- a_sync/a_sync/modifiers/cache/memory.py +165 -0
- a_sync/a_sync/modifiers/limiter.py +132 -0
- a_sync/a_sync/modifiers/manager.c +16149 -0
- a_sync/a_sync/modifiers/manager.cp310-win32.pyd +0 -0
- a_sync/a_sync/modifiers/manager.pxd +5 -0
- a_sync/a_sync/modifiers/manager.pyi +219 -0
- a_sync/a_sync/modifiers/manager.pyx +299 -0
- a_sync/a_sync/modifiers/semaphores.py +173 -0
- a_sync/a_sync/property.c +27260 -0
- a_sync/a_sync/property.cp310-win32.pyd +0 -0
- a_sync/a_sync/property.pyi +376 -0
- a_sync/a_sync/property.pyx +819 -0
- a_sync/a_sync/singleton.py +63 -0
- a_sync/aliases.py +3 -0
- a_sync/async_property/__init__.pxd +1 -0
- a_sync/async_property/__init__.py +1 -0
- a_sync/async_property/cached.c +20386 -0
- a_sync/async_property/cached.cp310-win32.pyd +0 -0
- a_sync/async_property/cached.pxd +10 -0
- a_sync/async_property/cached.pyi +45 -0
- a_sync/async_property/cached.pyx +178 -0
- a_sync/async_property/proxy.c +34654 -0
- a_sync/async_property/proxy.cp310-win32.pyd +0 -0
- a_sync/async_property/proxy.pxd +2 -0
- a_sync/async_property/proxy.pyi +124 -0
- a_sync/async_property/proxy.pyx +474 -0
- a_sync/asyncio/__init__.pxd +6 -0
- a_sync/asyncio/__init__.py +164 -0
- a_sync/asyncio/as_completed.c +18841 -0
- a_sync/asyncio/as_completed.cp310-win32.pyd +0 -0
- a_sync/asyncio/as_completed.pxd +8 -0
- a_sync/asyncio/as_completed.pyi +109 -0
- a_sync/asyncio/as_completed.pyx +269 -0
- a_sync/asyncio/create_task.c +15902 -0
- a_sync/asyncio/create_task.cp310-win32.pyd +0 -0
- a_sync/asyncio/create_task.pxd +2 -0
- a_sync/asyncio/create_task.pyi +51 -0
- a_sync/asyncio/create_task.pyx +271 -0
- a_sync/asyncio/gather.c +16679 -0
- a_sync/asyncio/gather.cp310-win32.pyd +0 -0
- a_sync/asyncio/gather.pyi +107 -0
- a_sync/asyncio/gather.pyx +218 -0
- a_sync/asyncio/igather.c +12676 -0
- a_sync/asyncio/igather.cp310-win32.pyd +0 -0
- a_sync/asyncio/igather.pxd +1 -0
- a_sync/asyncio/igather.pyi +7 -0
- a_sync/asyncio/igather.pyx +182 -0
- a_sync/asyncio/sleep.c +9593 -0
- a_sync/asyncio/sleep.cp310-win32.pyd +0 -0
- a_sync/asyncio/sleep.pyi +14 -0
- a_sync/asyncio/sleep.pyx +49 -0
- a_sync/debugging.c +15362 -0
- a_sync/debugging.cp310-win32.pyd +0 -0
- a_sync/debugging.pyi +76 -0
- a_sync/debugging.pyx +107 -0
- a_sync/exceptions.c +13312 -0
- a_sync/exceptions.cp310-win32.pyd +0 -0
- a_sync/exceptions.pyi +376 -0
- a_sync/exceptions.pyx +446 -0
- a_sync/executor.py +619 -0
- a_sync/functools.c +12738 -0
- a_sync/functools.cp310-win32.pyd +0 -0
- a_sync/functools.pxd +7 -0
- a_sync/functools.pyi +33 -0
- a_sync/functools.pyx +139 -0
- a_sync/future.py +1497 -0
- a_sync/iter.c +37271 -0
- a_sync/iter.cp310-win32.pyd +0 -0
- a_sync/iter.pxd +11 -0
- a_sync/iter.pyi +370 -0
- a_sync/iter.pyx +981 -0
- a_sync/primitives/__init__.pxd +1 -0
- a_sync/primitives/__init__.py +53 -0
- a_sync/primitives/_debug.c +15757 -0
- a_sync/primitives/_debug.cp310-win32.pyd +0 -0
- a_sync/primitives/_debug.pxd +12 -0
- a_sync/primitives/_debug.pyi +52 -0
- a_sync/primitives/_debug.pyx +223 -0
- a_sync/primitives/_loggable.c +11529 -0
- a_sync/primitives/_loggable.cp310-win32.pyd +0 -0
- a_sync/primitives/_loggable.pxd +4 -0
- a_sync/primitives/_loggable.pyi +66 -0
- a_sync/primitives/_loggable.pyx +102 -0
- a_sync/primitives/locks/__init__.pxd +8 -0
- a_sync/primitives/locks/__init__.py +17 -0
- a_sync/primitives/locks/counter.c +17679 -0
- a_sync/primitives/locks/counter.cp310-win32.pyd +0 -0
- a_sync/primitives/locks/counter.pxd +12 -0
- a_sync/primitives/locks/counter.pyi +151 -0
- a_sync/primitives/locks/counter.pyx +260 -0
- a_sync/primitives/locks/event.c +17063 -0
- a_sync/primitives/locks/event.cp310-win32.pyd +0 -0
- a_sync/primitives/locks/event.pxd +22 -0
- a_sync/primitives/locks/event.pyi +43 -0
- a_sync/primitives/locks/event.pyx +185 -0
- a_sync/primitives/locks/prio_semaphore.c +25590 -0
- a_sync/primitives/locks/prio_semaphore.cp310-win32.pyd +0 -0
- a_sync/primitives/locks/prio_semaphore.pxd +25 -0
- a_sync/primitives/locks/prio_semaphore.pyi +217 -0
- a_sync/primitives/locks/prio_semaphore.pyx +597 -0
- a_sync/primitives/locks/semaphore.c +26509 -0
- a_sync/primitives/locks/semaphore.cp310-win32.pyd +0 -0
- a_sync/primitives/locks/semaphore.pxd +21 -0
- a_sync/primitives/locks/semaphore.pyi +197 -0
- a_sync/primitives/locks/semaphore.pyx +454 -0
- a_sync/primitives/queue.py +1022 -0
- a_sync/py.typed +0 -0
- a_sync/sphinx/__init__.py +3 -0
- a_sync/sphinx/ext.py +289 -0
- a_sync/task.py +932 -0
- a_sync/utils/__init__.py +105 -0
- a_sync/utils/iterators.py +297 -0
- a_sync/utils/repr.c +15799 -0
- a_sync/utils/repr.cp310-win32.pyd +0 -0
- a_sync/utils/repr.pyi +2 -0
- a_sync/utils/repr.pyx +73 -0
- ez_a_sync-0.32.29.dist-info/METADATA +367 -0
- ez_a_sync-0.32.29.dist-info/RECORD +177 -0
- ez_a_sync-0.32.29.dist-info/WHEEL +5 -0
- ez_a_sync-0.32.29.dist-info/licenses/LICENSE.txt +17 -0
- ez_a_sync-0.32.29.dist-info/top_level.txt +1 -0
a_sync/_typing.py
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides type definitions and type-related utilities for the `a_sync` library.
|
|
3
|
+
|
|
4
|
+
It includes various type aliases and protocols used throughout the library to enhance type checking and provide better IDE support.
|
|
5
|
+
|
|
6
|
+
Examples:
|
|
7
|
+
The following examples demonstrate how to use some of the type aliases and protocols defined in this module.
|
|
8
|
+
|
|
9
|
+
Example of a function that can return either an awaitable or a direct value:
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from a_sync._typing import MaybeAwaitable
|
|
13
|
+
from typing import Awaitable
|
|
14
|
+
|
|
15
|
+
async def process_data(data: MaybeAwaitable[int]) -> int:
|
|
16
|
+
if isinstance(data, Awaitable):
|
|
17
|
+
return await data
|
|
18
|
+
return data
|
|
19
|
+
|
|
20
|
+
# Usage
|
|
21
|
+
import asyncio
|
|
22
|
+
|
|
23
|
+
async def main():
|
|
24
|
+
result = await process_data(asyncio.sleep(1, result=42))
|
|
25
|
+
print(result) # Output: 42
|
|
26
|
+
|
|
27
|
+
result = await process_data(42)
|
|
28
|
+
print(result) # Output: 42
|
|
29
|
+
|
|
30
|
+
asyncio.run(main())
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Example of defining a coroutine function type using `CoroFn` with `ParamSpec`:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from a_sync._typing import CoroFn
|
|
37
|
+
from typing_extensions import ParamSpec
|
|
38
|
+
from typing import Awaitable
|
|
39
|
+
|
|
40
|
+
P = ParamSpec("P")
|
|
41
|
+
|
|
42
|
+
async def async_function(x: int) -> str:
|
|
43
|
+
return str(x)
|
|
44
|
+
|
|
45
|
+
coro_fn: CoroFn[[int], str] = async_function
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Example of defining a synchronous function type using `SyncFn` with `ParamSpec`:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from a_sync._typing import SyncFn
|
|
52
|
+
from typing_extensions import ParamSpec
|
|
53
|
+
|
|
54
|
+
P = ParamSpec("P")
|
|
55
|
+
|
|
56
|
+
def sync_function(x: int) -> str:
|
|
57
|
+
return str(x)
|
|
58
|
+
|
|
59
|
+
sync_fn: SyncFn[[int], str] = sync_function
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
See Also:
|
|
63
|
+
- :mod:`typing`
|
|
64
|
+
- :mod:`asyncio`
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
import asyncio
|
|
68
|
+
from concurrent.futures._base import Executor
|
|
69
|
+
from decimal import Decimal
|
|
70
|
+
from typing import (
|
|
71
|
+
TYPE_CHECKING,
|
|
72
|
+
Any,
|
|
73
|
+
AsyncGenerator,
|
|
74
|
+
AsyncIterable,
|
|
75
|
+
AsyncIterator,
|
|
76
|
+
Awaitable,
|
|
77
|
+
Callable,
|
|
78
|
+
Coroutine,
|
|
79
|
+
DefaultDict,
|
|
80
|
+
Deque,
|
|
81
|
+
Dict,
|
|
82
|
+
Generator,
|
|
83
|
+
Generic,
|
|
84
|
+
ItemsView,
|
|
85
|
+
Iterable,
|
|
86
|
+
Iterator,
|
|
87
|
+
KeysView,
|
|
88
|
+
List,
|
|
89
|
+
Literal,
|
|
90
|
+
Mapping,
|
|
91
|
+
NoReturn,
|
|
92
|
+
Optional,
|
|
93
|
+
Protocol,
|
|
94
|
+
Set,
|
|
95
|
+
Tuple,
|
|
96
|
+
Type,
|
|
97
|
+
TypedDict,
|
|
98
|
+
TypeVar,
|
|
99
|
+
Union,
|
|
100
|
+
ValuesView,
|
|
101
|
+
overload,
|
|
102
|
+
runtime_checkable,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
from typing_extensions import Concatenate, ParamSpec, Self, Unpack
|
|
106
|
+
|
|
107
|
+
if TYPE_CHECKING:
|
|
108
|
+
from a_sync import ASyncGenericBase
|
|
109
|
+
|
|
110
|
+
B = TypeVar("B", bound=ASyncGenericBase)
|
|
111
|
+
else:
|
|
112
|
+
B = TypeVar("B")
|
|
113
|
+
|
|
114
|
+
T = TypeVar("T")
|
|
115
|
+
K = TypeVar("K")
|
|
116
|
+
V = TypeVar("V")
|
|
117
|
+
I = TypeVar("I")
|
|
118
|
+
"""A :class:`TypeVar` that is used to represent instances of a common class."""
|
|
119
|
+
|
|
120
|
+
E = TypeVar("E", bound=Exception)
|
|
121
|
+
TYPE = TypeVar("TYPE", bound=Type)
|
|
122
|
+
|
|
123
|
+
P = ParamSpec("P")
|
|
124
|
+
"""A :class:`ParamSpec` used everywhere in the lib."""
|
|
125
|
+
|
|
126
|
+
Numeric = Union[int, float, Decimal]
|
|
127
|
+
"""Type alias for numeric values of types int, float, or Decimal."""
|
|
128
|
+
|
|
129
|
+
MaybeAwaitable = Union[Awaitable[T], T]
|
|
130
|
+
"""Type alias for values that may or may not be awaitable. Useful for functions that can return either an awaitable or a direct value."""
|
|
131
|
+
|
|
132
|
+
MaybeCoro = Union[Coroutine[Any, Any, T], T]
|
|
133
|
+
"Type alias for values that may or may not be coroutine."
|
|
134
|
+
|
|
135
|
+
CoroFn = Callable[P, Awaitable[T]]
|
|
136
|
+
"Type alias for any function that returns an awaitable."
|
|
137
|
+
|
|
138
|
+
SyncFn = Callable[P, T]
|
|
139
|
+
"""Type alias for synchronous functions."""
|
|
140
|
+
|
|
141
|
+
AnyFn = Union[CoroFn[P, T], SyncFn[P, T]]
|
|
142
|
+
"Type alias for any function, whether synchronous or asynchronous."
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class CoroBoundMethod(Protocol[I, P, T]):
|
|
146
|
+
"""
|
|
147
|
+
Protocol for coroutine bound methods.
|
|
148
|
+
|
|
149
|
+
Example:
|
|
150
|
+
class MyClass:
|
|
151
|
+
async def my_method(self, x: int) -> str:
|
|
152
|
+
return str(x)
|
|
153
|
+
|
|
154
|
+
instance = MyClass()
|
|
155
|
+
bound_method: CoroBoundMethod[MyClass, [int], str] = instance.my_method
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
__self__: I
|
|
159
|
+
__call__: Callable[P, Awaitable[T]]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class SyncBoundMethod(Protocol[I, P, T]):
|
|
163
|
+
"""
|
|
164
|
+
Protocol for synchronous bound methods.
|
|
165
|
+
|
|
166
|
+
Example:
|
|
167
|
+
class MyClass:
|
|
168
|
+
def my_method(self, x: int) -> str:
|
|
169
|
+
return str(x)
|
|
170
|
+
|
|
171
|
+
instance = MyClass()
|
|
172
|
+
bound_method: SyncBoundMethod[MyClass, [int], str] = instance.my_method
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
__self__: I
|
|
176
|
+
__call__: Callable[P, T]
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
AnyBoundMethod = Union[CoroBoundMethod[Any, P, T], SyncBoundMethod[Any, P, T]]
|
|
180
|
+
"Type alias for any bound method, whether synchronous or asynchronous."
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@runtime_checkable
|
|
184
|
+
class AsyncUnboundMethod(Protocol[I, P, T]):
|
|
185
|
+
"""
|
|
186
|
+
Protocol for unbound asynchronous methods.
|
|
187
|
+
|
|
188
|
+
An unbound method is a method that hasn't been bound to an instance of a class yet.
|
|
189
|
+
It's essentially the function object itself, before it's accessed through an instance.
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
__get__: Callable[[I, Type], CoroBoundMethod[I, P, T]]
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@runtime_checkable
|
|
196
|
+
class SyncUnboundMethod(Protocol[I, P, T]):
|
|
197
|
+
"""
|
|
198
|
+
Protocol for unbound synchronous methods.
|
|
199
|
+
|
|
200
|
+
An unbound method is a method that hasn't been bound to an instance of a class yet.
|
|
201
|
+
It's essentially the function object itself, before it's accessed through an instance.
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
__get__: Callable[[I, Type], SyncBoundMethod[I, P, T]]
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
AnyUnboundMethod = Union[AsyncUnboundMethod[I, P, T], SyncUnboundMethod[I, P, T]]
|
|
208
|
+
"Type alias for any unbound method, whether synchronous or asynchronous."
|
|
209
|
+
|
|
210
|
+
AsyncGetterFunction = Callable[[I], Awaitable[T]]
|
|
211
|
+
"Type alias for asynchronous getter functions."
|
|
212
|
+
|
|
213
|
+
SyncGetterFunction = Callable[[I], T]
|
|
214
|
+
"Type alias for synchronous getter functions."
|
|
215
|
+
|
|
216
|
+
AnyGetterFunction = Union[AsyncGetterFunction[I, T], SyncGetterFunction[I, T]]
|
|
217
|
+
"Type alias for any getter function, whether synchronous or asynchronous."
|
|
218
|
+
|
|
219
|
+
AsyncDecorator = Callable[[CoroFn[P, T]], CoroFn[P, T]]
|
|
220
|
+
"Type alias for decorators for coroutine functions."
|
|
221
|
+
|
|
222
|
+
AsyncDecoratorOrCoroFn = Union[AsyncDecorator[P, T], CoroFn[P, T]]
|
|
223
|
+
"Type alias for either an asynchronous decorator or a coroutine function."
|
|
224
|
+
|
|
225
|
+
DefaultMode = Literal["sync", "async", None]
|
|
226
|
+
"Type alias for default modes of operation."
|
|
227
|
+
|
|
228
|
+
CacheType = Literal["memory", None]
|
|
229
|
+
"Type alias for cache types."
|
|
230
|
+
|
|
231
|
+
SemaphoreSpec = Optional[Union[asyncio.Semaphore, int]]
|
|
232
|
+
"Type alias for semaphore specifications."
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
class ModifierKwargs(TypedDict, total=False):
|
|
236
|
+
"""
|
|
237
|
+
TypedDict for keyword arguments that modify the behavior of asynchronous operations.
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
default: DefaultMode
|
|
241
|
+
cache_type: CacheType
|
|
242
|
+
cache_typed: bool
|
|
243
|
+
ram_cache_maxsize: Optional[int]
|
|
244
|
+
ram_cache_ttl: Optional[Numeric]
|
|
245
|
+
runs_per_minute: Optional[int]
|
|
246
|
+
semaphore: SemaphoreSpec
|
|
247
|
+
# sync modifiers
|
|
248
|
+
executor: Executor
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
AnyIterable = Union[AsyncIterable[K], Iterable[K]]
|
|
252
|
+
"Type alias for any iterable, whether synchronous or asynchronous."
|
|
253
|
+
|
|
254
|
+
AnyIterableOrAwaitableIterable = Union[AnyIterable[K], Awaitable[AnyIterable[K]]]
|
|
255
|
+
"""
|
|
256
|
+
Type alias for any iterable, whether synchronous or asynchronous,
|
|
257
|
+
or an awaitable that resolves to any iterable, whether synchronous or asynchronous.
|
|
258
|
+
"""
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module enables developers to write both synchronous and asynchronous code without having to write redundant code.
|
|
3
|
+
|
|
4
|
+
The two main objects you should use are
|
|
5
|
+
- a decorator `@a_sync()`
|
|
6
|
+
- a base class `ASyncGenericBase` which can be used to create classes that can be utilized in both synchronous and asynchronous contexts.
|
|
7
|
+
|
|
8
|
+
The rest of the objects are exposed for type checking only, you should not make use of them otherwise.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# TODO: double check on these before adding them to docs
|
|
12
|
+
# - two decorators @:class:`property` and @:class:`cached_property` for the creation of dual-function properties and cached properties, respectively.
|
|
13
|
+
|
|
14
|
+
from a_sync.a_sync.base import ASyncGenericBase
|
|
15
|
+
from a_sync.a_sync.decorator import a_sync
|
|
16
|
+
from a_sync.a_sync.function import (
|
|
17
|
+
ASyncFunction,
|
|
18
|
+
ASyncFunctionAsyncDefault,
|
|
19
|
+
ASyncFunctionSyncDefault,
|
|
20
|
+
)
|
|
21
|
+
from a_sync.a_sync.property import (
|
|
22
|
+
ASyncCachedPropertyDescriptor,
|
|
23
|
+
ASyncCachedPropertyDescriptorAsyncDefault,
|
|
24
|
+
ASyncCachedPropertyDescriptorSyncDefault,
|
|
25
|
+
ASyncPropertyDescriptor,
|
|
26
|
+
ASyncPropertyDescriptorAsyncDefault,
|
|
27
|
+
ASyncPropertyDescriptorSyncDefault,
|
|
28
|
+
HiddenMethod,
|
|
29
|
+
HiddenMethodDescriptor,
|
|
30
|
+
)
|
|
31
|
+
from a_sync.a_sync.property import ASyncCachedPropertyDescriptor as cached_property
|
|
32
|
+
from a_sync.a_sync.property import ASyncPropertyDescriptor as property
|
|
33
|
+
from a_sync.a_sync.singleton import ASyncGenericSingleton
|
|
34
|
+
|
|
35
|
+
# NOTE: We purposely import this without including in __all__. Do not remove.
|
|
36
|
+
from a_sync.a_sync.modifiers.semaphores import apply_semaphore
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
# entrypoints
|
|
41
|
+
"a_sync",
|
|
42
|
+
"ASyncGenericBase",
|
|
43
|
+
"ASyncGenericSingleton",
|
|
44
|
+
# maybe entrypoints (?)
|
|
45
|
+
# TODO: double check how I intended for these to be used
|
|
46
|
+
"property",
|
|
47
|
+
"cached_property",
|
|
48
|
+
# classes exposed for type hinting only
|
|
49
|
+
"ASyncFunction",
|
|
50
|
+
"ASyncFunctionSyncDefault",
|
|
51
|
+
"ASyncFunctionAsyncDefault",
|
|
52
|
+
"ASyncPropertyDescriptor",
|
|
53
|
+
"ASyncPropertyDescriptorSyncDefault",
|
|
54
|
+
"ASyncPropertyDescriptorAsyncDefault",
|
|
55
|
+
"ASyncCachedPropertyDescriptor",
|
|
56
|
+
"ASyncCachedPropertyDescriptorSyncDefault",
|
|
57
|
+
"ASyncCachedPropertyDescriptorAsyncDefault",
|
|
58
|
+
"HiddenMethod",
|
|
59
|
+
"HiddenMethodDescriptor",
|
|
60
|
+
]
|