ez-a-sync 0.32.29__cp310-cp310-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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-win_amd64.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
|
Binary file
|
a_sync/utils/repr.pyi
ADDED
a_sync/utils/repr.pyx
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from itertools import islice
|
|
2
|
+
from typing import Any, Iterable
|
|
3
|
+
|
|
4
|
+
from cpython.dict cimport PyDict_Size
|
|
5
|
+
from cpython.list cimport PyList_GET_SIZE
|
|
6
|
+
from cpython.object cimport Py_TYPE, PyObject_Repr
|
|
7
|
+
from cpython.tuple cimport PyTuple_GET_SIZE
|
|
8
|
+
|
|
9
|
+
cdef extern from "Python.h":
|
|
10
|
+
ctypedef struct PyTypeObject:
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
L, S, D = [], set(), {}
|
|
15
|
+
cdef PyTypeObject *List_ptr = Py_TYPE(L)
|
|
16
|
+
cdef PyTypeObject *Tuple_ptr = Py_TYPE(())
|
|
17
|
+
cdef PyTypeObject *Dict_ptr = Py_TYPE(D)
|
|
18
|
+
cdef PyTypeObject *DictKeys_ptr = Py_TYPE(D.keys())
|
|
19
|
+
cdef PyTypeObject *DictValues_ptr = Py_TYPE(D.values())
|
|
20
|
+
cdef PyTypeObject *DictItems_ptr = Py_TYPE(D.items())
|
|
21
|
+
cdef PyTypeObject *Set_ptr = Py_TYPE(S)
|
|
22
|
+
del L, S, D
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def repr_trunc(iterable: Iterable[Any]) -> str:
|
|
26
|
+
"""Returns a truncated `repr` for `iterable`, limited to the first 5 items."""
|
|
27
|
+
cdef PyTypeObject *itype = Py_TYPE(iterable)
|
|
28
|
+
if itype == List_ptr:
|
|
29
|
+
return _join_first_5_reprs_list(iterable)
|
|
30
|
+
elif itype == Tuple_ptr:
|
|
31
|
+
return _join_first_5_reprs_tuple(iterable)
|
|
32
|
+
elif itype == Dict_ptr:
|
|
33
|
+
if PyDict_Size(iterable) <= 5:
|
|
34
|
+
return "{" + ", ".join(
|
|
35
|
+
f"{PyObject_Repr(k)}: {repr(iterable[k])}"
|
|
36
|
+
for k in iterable
|
|
37
|
+
) + "}"
|
|
38
|
+
else:
|
|
39
|
+
return "{" + ", ".join(
|
|
40
|
+
f"{PyObject_Repr(k)}: {repr(iterable[k])}"
|
|
41
|
+
for k in islice(iterable, 5)
|
|
42
|
+
) + ", ...}"
|
|
43
|
+
elif itype == DictKeys_ptr:
|
|
44
|
+
return f"dict_keys([{_join_first_5_reprs_generic(iterable)}])"
|
|
45
|
+
elif itype == DictValues_ptr:
|
|
46
|
+
return f"dict_values([{_join_first_5_reprs_generic(iterable)}])"
|
|
47
|
+
elif itype == DictItems_ptr:
|
|
48
|
+
return f"dict_items([{_join_first_5_reprs_generic(iterable)}])"
|
|
49
|
+
elif itype == Set_ptr:
|
|
50
|
+
return "{" + _join_first_5_reprs_generic(iterable) + "}"
|
|
51
|
+
else:
|
|
52
|
+
return PyObject_Repr(iterable)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
cdef inline str _join_first_5_reprs_list(list[object] lst):
|
|
56
|
+
if PyList_GET_SIZE(lst) <= 5:
|
|
57
|
+
return f"[{', '.join(PyObject_Repr(obj) for obj in lst)}]"
|
|
58
|
+
else:
|
|
59
|
+
return f"[{', '.join(PyObject_Repr(obj) for obj in lst[:5])}, ...]"
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
cdef inline str _join_first_5_reprs_tuple(tuple[object, ...] tup):
|
|
63
|
+
if PyTuple_GET_SIZE(tup) <= 5:
|
|
64
|
+
return f"({', '.join(PyObject_Repr(obj) for obj in tup)})"
|
|
65
|
+
else:
|
|
66
|
+
return f"({', '.join(PyObject_Repr(obj) for obj in tup[:5])}, ...)"
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
cdef str _join_first_5_reprs_generic(iterable: Iterable[Any]):
|
|
70
|
+
if len(iterable) <= 5:
|
|
71
|
+
return ", ".join(PyObject_Repr(obj) for obj in iterable)
|
|
72
|
+
else:
|
|
73
|
+
return f"{', '.join(PyObject_Repr(obj) for obj in islice(iterable, 5))}, ..."
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ez_a_sync
|
|
3
|
+
Version: 0.32.29
|
|
4
|
+
Summary: A library that makes it easy to define objects that can be used for both sync and async use cases.
|
|
5
|
+
Home-page: https://github.com/BobTheBuidler/a-sync
|
|
6
|
+
Author: BobTheBuidler
|
|
7
|
+
Author-email: bobthebuidlerdefi@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.8,<3.14
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE.txt
|
|
22
|
+
Requires-Dist: aiolimiter>=1
|
|
23
|
+
Requires-Dist: async_lru_threadsafe==2.0.4
|
|
24
|
+
Requires-Dist: async_property==0.2.2
|
|
25
|
+
Requires-Dist: typed_envs>=0.0.5
|
|
26
|
+
Requires-Dist: typing_extensions>=4.1.0
|
|
27
|
+
Dynamic: author
|
|
28
|
+
Dynamic: author-email
|
|
29
|
+
Dynamic: classifier
|
|
30
|
+
Dynamic: description
|
|
31
|
+
Dynamic: description-content-type
|
|
32
|
+
Dynamic: home-page
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
Dynamic: summary
|
|
38
|
+
|
|
39
|
+
## Table of Contents
|
|
40
|
+
<!-- TOC -->
|
|
41
|
+
|
|
42
|
+
- [Table of Contents](#table-of-contents)
|
|
43
|
+
- [Introduction](#introduction)
|
|
44
|
+
- [Installation](#installation)
|
|
45
|
+
- [Usage](#usage)
|
|
46
|
+
- [Decorators](#decorators)
|
|
47
|
+
- [@a_sync'async'](#a_syncasync)
|
|
48
|
+
- [@a_sync'sync'](#a_syncsync)
|
|
49
|
+
- [Classes](#classes)
|
|
50
|
+
- [Modifiers](#modifiers)
|
|
51
|
+
- [async modifiers](#async-modifiers)
|
|
52
|
+
- [sync modifiers](#sync-modifiers)
|
|
53
|
+
- [Default Modifiers](#default-modifiers)
|
|
54
|
+
- [Other Helpful Classes](#other-helpful-modules)
|
|
55
|
+
- [ASyncIterable](#asynciterable)
|
|
56
|
+
- [ASyncIterator](#asynciterator)
|
|
57
|
+
- [ASyncFilter](#asyncfilter)
|
|
58
|
+
- [ASyncSorter](#asyncsorter)
|
|
59
|
+
- [Other Helpful Modules](#other-helpful-modules)
|
|
60
|
+
- [future](#future)
|
|
61
|
+
- [ASyncFuture](#asyncfuture)
|
|
62
|
+
- [future decorator](#future-decorator)
|
|
63
|
+
- [asyncio](#asyncio)
|
|
64
|
+
|
|
65
|
+
<!-- /TOC -->
|
|
66
|
+
## Introduction
|
|
67
|
+
|
|
68
|
+
`ez-a-sync` is a Python library that enables developers to write both synchronous and asynchronous code without having to write redundant code. It provides a decorator `@a_sync()`, as well as a base class `ASyncGenericBase` which can be used to create classes that can be executed in both synchronous and asynchronous contexts.
|
|
69
|
+
|
|
70
|
+
It also contains implementations of various asyncio primitives with extra functionality, including queues and various types of locks.
|
|
71
|
+
\# TODO add links to various objects' docs
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
`ez-a-sync` can be installed via pip:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
pip install ez-a-sync
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
### Decorators
|
|
84
|
+
|
|
85
|
+
`ez-a-sync` provides one decorator: `@a_sync()`. You can explicitly pass the type of function you want with `@a_sync('sync')` or `@a_sync('async')`
|
|
86
|
+
|
|
87
|
+
#### `@a_sync('async')`
|
|
88
|
+
|
|
89
|
+
The `@a_sync('async')` decorator can be used to define an asynchronous function that can also be executed synchronously.
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
@a_sync('async')
|
|
93
|
+
def some_function():
|
|
94
|
+
...
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This function can then be executed asynchronously using `await`:
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
aaa = await some_function()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
It can also be executed synchronously by passing `sync=True` or `asynchronous=False`:
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
aaa = some_function(sync=True)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### `@a_sync('sync')`
|
|
110
|
+
|
|
111
|
+
The `@a_sync('sync')` decorator can be used to define a synchronous function that can also be executed asynchronously.
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
@a_sync('sync')
|
|
115
|
+
async def some_function():
|
|
116
|
+
...
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
This function can then be executed synchronously:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
aaa = some_function()
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
It can also be overridden asynchronously by passing `sync=False` or `asynchronous=True` and using `await`:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
aaa = await some_function(sync=False)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Classes
|
|
132
|
+
|
|
133
|
+
`ez-a-sync` also provides a base class `ASyncGenericBase` that can be used to create classes that can be executed in both synchronous and asynchronous contexts. To create an asynchronous class, simply inherit from `ASyncGenericBase` and set `asynchronous=True`:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
class CoolAsyncClass(ASyncGenericBase):
|
|
137
|
+
asynchronous=True
|
|
138
|
+
|
|
139
|
+
def some_sync_fn():
|
|
140
|
+
...
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
In this example, `CoolAsyncClass` has `asynchronous=True`, which means it is an asynchronous class. You can call `some_sync_fn` asynchronously using `await`:
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
aaa = await CoolAsyncClass().some_sync_fn()
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`CoolAsyncClass` functions can also be called synchronously by passing `sync=True`:
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
aaa = CoolAsyncClass().some_sync_fn(sync=True)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Similarly, you can create a synchronous class by setting `sync=True` or `asynchronous=False`:
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
class CoolSyncClass(ASyncGenericBase):
|
|
159
|
+
asynchronous=False
|
|
160
|
+
|
|
161
|
+
async def some_async_fn():
|
|
162
|
+
...
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`CoolSyncClass` functions can be called synchronously:
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
aaa = CoolSyncClass().some_async_fn()
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
It can also be called asynchronously by passing `sync=False` or `asynchronous=True` and using `await`:
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
aaa = await CoolSyncClass().some_async_fn(sync=False)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
You can also create a class which functions can be executed in both synchronous and asynchronous contexts by not setting the `asynchronous` or `sync` attribute (both can be used interchangeably, pick your favorite) and passing it as an argument when creating an instance:
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
class CoolDualClass(ASyncGenericBase):
|
|
181
|
+
def __init__(self, asynchronous):
|
|
182
|
+
self.asynchronous=asynchronous
|
|
183
|
+
|
|
184
|
+
async def some_async_fn():
|
|
185
|
+
...
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
You can create an instance of `CoolDualClass` with `sync=False` or `asynchronous=True` to call it asynchronously:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
async_instance = CoolDualClass(asynchronous=True)
|
|
192
|
+
aaa = await async_instance.some_async_fn()
|
|
193
|
+
aaa = async_instance.some_async_fn(sync=True)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
You can also create an instance with `sync=True` or `asynchronous=False` to call it synchronously:
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
sync_instance = CoolDualClass(asynchronous=False)
|
|
200
|
+
aaa = sync_instance.some_async_fn()
|
|
201
|
+
aaa = sync_instance.some_async_fn(sync=False)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Modifiers
|
|
205
|
+
|
|
206
|
+
The `ez-a-sync` library provides several settings that can be used to customize the behavior of the decorators and classes.
|
|
207
|
+
|
|
208
|
+
To apply settings to the decorators or base classes, simply pass them as keyword arguments when calling the decorator or creating an instance.
|
|
209
|
+
|
|
210
|
+
For example, to apply `cache_type='memory'` to a function decorated with `@a_sync('async')`, you would do the following:
|
|
211
|
+
|
|
212
|
+
```python
|
|
213
|
+
@a_sync('async', cache_type='memory')
|
|
214
|
+
def some_function():
|
|
215
|
+
...
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### async modifiers
|
|
219
|
+
|
|
220
|
+
The `@a_sync('async')` decorator has the following settings:
|
|
221
|
+
|
|
222
|
+
- `cache_type`: This can be set to `None` or `'memory'`. `'memory'` is a LRU cache which can be modified with the `cache_typed`, `ram_cache_maxsize`, and `ram_cache_ttl` modifiers.
|
|
223
|
+
- `cache_typed`: Set to `True` if you want types considered treated for cache keys. i.e. with `cache_typed=True`, `Decimal(0)` and `0` will be considered separate keys.
|
|
224
|
+
- `ram_cache_maxsize`: The maxsize for your LRU cache. Set to `None` if the cache is unbounded. If you set this value without specifying a cache type, `'memory'` will automatically be applied.
|
|
225
|
+
- `ram_cache_ttl`: The TTL for items in your LRU cache. Set to `None`. If you set this value without specifying a cache type, `'memory'` will automatically be applied.
|
|
226
|
+
- `runs_per_minute`: Setting this value enables a rate limiter for the decorated function.
|
|
227
|
+
- `semaphore`: Drop in a Semaphore for your async defined functions.
|
|
228
|
+
|
|
229
|
+
#### sync modifiers
|
|
230
|
+
|
|
231
|
+
The `@a_sync('sync')` decorator has the following setting:
|
|
232
|
+
|
|
233
|
+
- `executor`: The executor for the synchronous function. Set to the library's default of `config.default_sync_executor`.
|
|
234
|
+
|
|
235
|
+
#### Default Modifiers
|
|
236
|
+
|
|
237
|
+
Instead of setting modifiers one by one in functions, you can set a default value for modifiers using ENV variables:
|
|
238
|
+
|
|
239
|
+
- `DEFAULT_MODE`
|
|
240
|
+
- `CACHE_TYPE`
|
|
241
|
+
- `CACHE_TYPED`
|
|
242
|
+
- `RAM_CACHE_MAXSIZE`
|
|
243
|
+
- `RAM_CACHE_TTL`
|
|
244
|
+
- `RUNS_PER_MINUTE`
|
|
245
|
+
- `SEMAPHORE`
|
|
246
|
+
|
|
247
|
+
### Other Helpful Classes
|
|
248
|
+
#### ASyncIterable
|
|
249
|
+
The [ASyncIterable](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncIterable) class allows objects to be iterated over using either a standard `for` loop or an `async for` loop. This is particularly useful in scenarios where the mode of iteration needs to be flexible or is determined at runtime.
|
|
250
|
+
|
|
251
|
+
```python
|
|
252
|
+
from a_sync import ASyncIterable
|
|
253
|
+
|
|
254
|
+
async_iterable = ASyncIterable(some_async_iterable)
|
|
255
|
+
|
|
256
|
+
# Asynchronous iteration
|
|
257
|
+
async for item in async_iterable:
|
|
258
|
+
...
|
|
259
|
+
|
|
260
|
+
# Synchronous iteration
|
|
261
|
+
for item in async_iterable:
|
|
262
|
+
...
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
See the [documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncIterable) for more information.
|
|
266
|
+
|
|
267
|
+
#### ASyncIterator
|
|
268
|
+
|
|
269
|
+
The [ASyncIterator](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncIterator) class provides a unified interface for iteration that can operate in both synchronous and asynchronous contexts. It allows the wrapping of asynchronous iterable objects or async generator functions.
|
|
270
|
+
|
|
271
|
+
```python
|
|
272
|
+
from a_sync import ASyncIterator
|
|
273
|
+
|
|
274
|
+
async_iterator = ASyncIterator(some_async_iterator)
|
|
275
|
+
|
|
276
|
+
# Asynchronous iteration
|
|
277
|
+
async for item in async_iterator:
|
|
278
|
+
...
|
|
279
|
+
|
|
280
|
+
# Synchronous iteration
|
|
281
|
+
for item in async_iterator:
|
|
282
|
+
...
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
See the [documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncIterator) for more information.
|
|
286
|
+
|
|
287
|
+
#### ASyncFilter
|
|
288
|
+
|
|
289
|
+
The [ASyncFilter](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncFilter) class filters items of an async iterable based on a provided function. It can handle both synchronous and asynchronous filter functions.
|
|
290
|
+
|
|
291
|
+
```python
|
|
292
|
+
from a_sync import ASyncFilter
|
|
293
|
+
|
|
294
|
+
async def is_even(x):
|
|
295
|
+
return x % 2 == 0
|
|
296
|
+
|
|
297
|
+
filtered_iterable = ASyncFilter(is_even, some_async_iterable)
|
|
298
|
+
|
|
299
|
+
# or use the alias
|
|
300
|
+
import a_sync
|
|
301
|
+
|
|
302
|
+
filtered_iterable = a_sync.filter(is_even, some_async_iterable)
|
|
303
|
+
|
|
304
|
+
# Asynchronous iteration
|
|
305
|
+
async for item in filtered_iterable:
|
|
306
|
+
...
|
|
307
|
+
|
|
308
|
+
# Synchronous iteration
|
|
309
|
+
for item in filtered_iterable:
|
|
310
|
+
...
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
See the [documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncFilter) for more information.
|
|
314
|
+
|
|
315
|
+
#### ASyncSorter
|
|
316
|
+
|
|
317
|
+
The [ASyncSorter](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncSorter) class sorts items of an async iterable based on a provided key function. It supports both synchronous and asynchronous key functions.
|
|
318
|
+
|
|
319
|
+
```python
|
|
320
|
+
from a_sync import ASyncSorter
|
|
321
|
+
|
|
322
|
+
sorted_iterable = ASyncSorter(some_async_iterable, key=lambda x: x.value)
|
|
323
|
+
|
|
324
|
+
# or use the alias
|
|
325
|
+
import a_sync
|
|
326
|
+
|
|
327
|
+
sorted_iterable = a_sync.sort(some_async_iterable, key=lambda x: x.value)
|
|
328
|
+
|
|
329
|
+
# Asynchronous iteration
|
|
330
|
+
async for item in sorted_iterable:
|
|
331
|
+
...
|
|
332
|
+
|
|
333
|
+
# Synchronous iteration
|
|
334
|
+
for item in sorted_iterable:
|
|
335
|
+
...
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
See the [documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.ASyncSorter) for more information.
|
|
339
|
+
|
|
340
|
+
## Other Helpful Modules
|
|
341
|
+
The stuff here is unrelated to the main purpose of ez-a-sync, but cool and useful nonetheless
|
|
342
|
+
|
|
343
|
+
### asyncio
|
|
344
|
+
|
|
345
|
+
The `ez-a-sync` library extends the functionality of Python's `asyncio` module with additional utilities to simplify asynchronous programming.
|
|
346
|
+
|
|
347
|
+
- **as_completed**: This function allows you to iterate over awaitables as they complete, similar to `asyncio.as_completed`. It supports both synchronous and asynchronous iteration. [Learn more about `as_completed`](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.asyncio.as_completed).
|
|
348
|
+
|
|
349
|
+
- **gather**: A utility to run multiple asynchronous operations concurrently and wait for all of them to complete. It is similar to `asyncio.gather` but integrates seamlessly with the `ez-a-sync` library. [Learn more about `gather`](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.asyncio.gather).
|
|
350
|
+
|
|
351
|
+
- **create_task**: A function to create a new task from a coroutine, similar to `asyncio.create_task`, but with additional features provided by `ez-a-sync`. [Learn more about `create_task`](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.asyncio.create_task).
|
|
352
|
+
|
|
353
|
+
- **as_completed**: This function allows you to iterate over awaitables as they complete, similar to `asyncio.as_completed`. It supports both synchronous and asynchronous iteration. [Learn more about `as_completed`](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.asyncio.as_completed).
|
|
354
|
+
|
|
355
|
+
These utilities enhance the standard `asyncio` module, providing more flexibility and control over asynchronous operations. For detailed documentation and examples, please refer to the [documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.asyncio)
|
|
356
|
+
|
|
357
|
+
### future
|
|
358
|
+
The future module is something totally different.
|
|
359
|
+
TODO: short explainer of module value prop and use case
|
|
360
|
+
|
|
361
|
+
#### ASyncFuture
|
|
362
|
+
[documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.future.ASyncFuture)
|
|
363
|
+
TODO: short explainers on ASyncFuture class
|
|
364
|
+
|
|
365
|
+
#### future decorator
|
|
366
|
+
[documentation](#https://bobthebuidler.github.io/ez-a-sync/source/a_sync.html#a_sync.future.future)
|
|
367
|
+
TODO: short explainers on future fn
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
a_sync/ENVIRONMENT_VARIABLES.py,sha256=ikTsq2B3rUli665CTWkH_UsBwuXXAhrNvcosup6KsC8,1322
|
|
2
|
+
a_sync/__init__.pxd,sha256=u2LfI62DUKrUr5k3O5-65sWl-QETx6ozR8REh-qMv74,82
|
|
3
|
+
a_sync/__init__.py,sha256=tohlFfExaQi5ObUQzk83CXRuoqNrXClk77llHA-PNcs,5895
|
|
4
|
+
a_sync/_smart.c,sha256=SgzAHTQVA9JynyGXUkRsOU_2VuPQ5GckBg3hN3V-Hm8,980383
|
|
5
|
+
a_sync/_smart.cp310-win_amd64.pyd,sha256=Rban7ERKtIEYfwSCtVOdSfKSzb5VtLdk1DKPchpjiAM,137728
|
|
6
|
+
a_sync/_smart.pxd,sha256=HfWxESAe26BGlvM20vLC7vcsv-N1jRaQbXd-HjUQ2wE,78
|
|
7
|
+
a_sync/_smart.pyi,sha256=rLRA5tB6H7CTTpUYGrwuweZ00YQDoxMKV4kDhoTYL3Y,5592
|
|
8
|
+
a_sync/_smart.pyx,sha256=usvW53fDuIOCm6qHiZhhl_KVetFkm9tVjN9AAlJTnPw,20502
|
|
9
|
+
a_sync/_typing.py,sha256=-5BrrywuQcO6noiArKCTdMDB29xeWp_E9BBJQC2oFLk,7108
|
|
10
|
+
a_sync/aliases.py,sha256=Ri300mMgj0EUmffx1g2FsfuglRd_Gc-8SlzLv0Sn8J8,215
|
|
11
|
+
a_sync/debugging.c,sha256=2FI0VyhRnxQgqcfHBZNHJWyD_PJYuOs2R2Jrgw620zc,648535
|
|
12
|
+
a_sync/debugging.cp310-win_amd64.pyd,sha256=yVQI9wjIre7PG2B1NNwMQZ1zpYhwVemVdIq3GZ7ceFw,95232
|
|
13
|
+
a_sync/debugging.pyi,sha256=YqShsfa-Bgviuyr3Os4bWQf8yS4w0wa4AZLcSfq1kvU,2387
|
|
14
|
+
a_sync/debugging.pyx,sha256=SusQeWBuibY_7BuldAwdcBAW5By-LbkEYrp2KqCvehM,3152
|
|
15
|
+
a_sync/exceptions.c,sha256=2z3wl3BW--jcb-MrKqoAF72DySNPb59ZzuvAodeFr4c,604095
|
|
16
|
+
a_sync/exceptions.cp310-win_amd64.pyd,sha256=X9I9zIAIjWSkBnPm36Pxcz4aEmrxx2d2_OOMKCTR5zc,87040
|
|
17
|
+
a_sync/exceptions.pyi,sha256=bU3gjEYwPF7EgA8BpqL9WfsuUO_VVdHy6Ke4yTJ-kDA,11210
|
|
18
|
+
a_sync/exceptions.pyx,sha256=U6X7-g5KHqClKcEMzl4-6vi_a7Lez7itaAKXLbP_cvw,13720
|
|
19
|
+
a_sync/executor.py,sha256=AUffN4WSfOkaIiVbT7R1bOHEylRNPMkhiCscQbjcEJM,23474
|
|
20
|
+
a_sync/functools.c,sha256=B51bWyAt-rsCfNGT1IotvKQDi7BfRV0gBMcKqzBmqLA,532417
|
|
21
|
+
a_sync/functools.cp310-win_amd64.pyd,sha256=sZF-Ap_kbVYBo1CBd93fZN_yvV6uUk9QZkdimTKU33U,64000
|
|
22
|
+
a_sync/functools.pxd,sha256=SBLpWvCOU4103wWzKsZjNQnJ_KzGMYU_dBgFLkS4Y2w,193
|
|
23
|
+
a_sync/functools.pyi,sha256=NZbuO-psulMCNMEKlX4ZlkiZioFlyEmNG-pwOkmzl_E,1437
|
|
24
|
+
a_sync/functools.pyx,sha256=35fUpflI6a4l95eoqSVaKyXDXw-6tuH77C0oy_u2MFc,4976
|
|
25
|
+
a_sync/future.py,sha256=Wp92G-rmbRo-QBAjZcF-Ah142JzQec_ygOKqQknq-WM,50172
|
|
26
|
+
a_sync/iter.c,sha256=yGl0qNcJFH7CvVGykBC3UmhAQebrZrQgTMWmtj6tgos,1738378
|
|
27
|
+
a_sync/iter.cp310-win_amd64.pyd,sha256=FxlknGRfFZYGnQLBsVa5ulRi0r9rB7hLuJqJ0VktW3c,285184
|
|
28
|
+
a_sync/iter.pxd,sha256=MFhRBVeY4h4vg2zm1LH973air-2Lciy1IbrYekZmByM,438
|
|
29
|
+
a_sync/iter.pyi,sha256=9huif7VhTov0FE8fy9U3wcCgy7C6YUsQkiup0nttvXE,15830
|
|
30
|
+
a_sync/iter.pyx,sha256=CLUrgkggB-HEXiDJ9IADwtJBZEQMcMOPGapQk2ZXgg0,38467
|
|
31
|
+
a_sync/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
+
a_sync/task.py,sha256=3GK-pruDOXmpODMmHFmHOdXwh8cpyheHkXDk-SVP-ks,35981
|
|
33
|
+
a_sync/a_sync/__init__.py,sha256=LwgGpuG7UVq8bE2K_Uwb21T7X9cs0QZHNzNdPaw11kU,2260
|
|
34
|
+
a_sync/a_sync/_descriptor.c,sha256=vUVvpBU6EhYHrMngyAfGzQ-icatmew3-SlNFLb9oZRE,933348
|
|
35
|
+
a_sync/a_sync/_descriptor.cp310-win_amd64.pyd,sha256=ajY_NnF16e2eG6wU8OEQCIFBU0x3KWQYxC1j_b_UiCE,142336
|
|
36
|
+
a_sync/a_sync/_descriptor.pyi,sha256=SYNqiHNy88aRpXMaH6ZJrty2H2kfNs3ruz4zbEidgFg,1233
|
|
37
|
+
a_sync/a_sync/_descriptor.pyx,sha256=2AQNRvgXGEYye5YvxRKTY3GFHRU-jyYs7fLojCzqVS4,14024
|
|
38
|
+
a_sync/a_sync/_flags.c,sha256=sXyamLeasx88yWnrD1Th-2SE2Fz827exOuNaQ98SXG0,247600
|
|
39
|
+
a_sync/a_sync/_flags.cp310-win_amd64.pyd,sha256=Tt8UHwNXqlqLygTgcnC7OSP404TfiZ1v-KBkPUmPgkc,27648
|
|
40
|
+
a_sync/a_sync/_flags.pxd,sha256=Cg1AkZCQiQumx05MeorTagundpSWrOHbacGGi5vOv1k,191
|
|
41
|
+
a_sync/a_sync/_flags.pyx,sha256=MEhX5g-CRJUHKLUAuY7n_AOkBaQ92Wx_bvpha6n2o8w,2898
|
|
42
|
+
a_sync/a_sync/_helpers.c,sha256=KBO4al7lDAXkrOFF0EFRaU8ewmNZ78fS1W59XVh7Px4,629239
|
|
43
|
+
a_sync/a_sync/_helpers.cp310-win_amd64.pyd,sha256=LZYjlK2vQBpm3Owhfgwegz-dXnLa-WaWclGfp1zUQbs,79872
|
|
44
|
+
a_sync/a_sync/_helpers.pxd,sha256=RYO8vxJqfoHcmLYG4lQQlEIdH5qcE0Ar5yOe6mRTIvo,120
|
|
45
|
+
a_sync/a_sync/_helpers.pyi,sha256=ewJ4yDFx-pP9beBj9lpYgateBqp3pr8_RHTvN9MgFZQ,329
|
|
46
|
+
a_sync/a_sync/_helpers.pyx,sha256=XUWBNmO8ehUQiEv14sZBdXAgJ9aMIJBfLqrcFmo34UA,5576
|
|
47
|
+
a_sync/a_sync/_kwargs.c,sha256=IfKrtsuxVYf_hHbyqLqROVxWzw07duku0Mz6ibRDWI0,497368
|
|
48
|
+
a_sync/a_sync/_kwargs.cp310-win_amd64.pyd,sha256=702xBvLx4jnu9vLtviKUR6xt_FyIyg44Tq-F0e9T3og,58880
|
|
49
|
+
a_sync/a_sync/_kwargs.pxd,sha256=dz6yAQQaGBGkt22S7ASk8jfeoSCEdWP2VHFiqht3r3A,94
|
|
50
|
+
a_sync/a_sync/_kwargs.pyx,sha256=VwGobiT_9tmRDEX7avQKjkn66wwLc9-933WDjvH-x_g,2039
|
|
51
|
+
a_sync/a_sync/_meta.py,sha256=MgNh72akj_H7hPYBRAvj6lUDohWa-eW3s9jW3PURN80,9639
|
|
52
|
+
a_sync/a_sync/abstract.c,sha256=NmGdAx_WUGnkfoY5G4RwKKuHWOzpeZaxEmNUf1jPBdE,535598
|
|
53
|
+
a_sync/a_sync/abstract.cp310-win_amd64.pyd,sha256=LbVLKwomLT0WDjzckKaPQaKa7hDpFDWgraCQe9NecQc,69120
|
|
54
|
+
a_sync/a_sync/abstract.pyi,sha256=Ums1jr8ZquteHeNIch-chQvGfyMYeFa8Oz3TjgthItM,5198
|
|
55
|
+
a_sync/a_sync/abstract.pyx,sha256=SW3tga3n8JcgEaJrPpsn9bKn_kjmb4_8za7_QWowT60,8085
|
|
56
|
+
a_sync/a_sync/base.c,sha256=oFpkherAek8zFMp53FZuDOkox8kuH7YK2HN-Tl8Kvbk,643171
|
|
57
|
+
a_sync/a_sync/base.cp310-win_amd64.pyd,sha256=zavCABV_U-KkV_p1qGbirSWPxzdlShBbq--XFNI5-js,86528
|
|
58
|
+
a_sync/a_sync/base.pyi,sha256=9wk5iGRVIPNyMvRZx-QKdIcJAaRvc7vs8_26SGqJ2Dw,2372
|
|
59
|
+
a_sync/a_sync/base.pyx,sha256=a-G6AONvQwGs53Eo1Sj5ELpUFPHSiTZyrxEO-o8vJsk,10874
|
|
60
|
+
a_sync/a_sync/config.py,sha256=-dtN8cDc9jzuB7TPdbgjr_uz3hTvZGnOCOvcfeWBB6Y,6389
|
|
61
|
+
a_sync/a_sync/decorator.py,sha256=RpIJPmbzAl8v-NhjhzKuJuMZP6TnjSU1R7h_DvMwlEA,20401
|
|
62
|
+
a_sync/a_sync/flags.c,sha256=zSG8ui4Zbw4ibrOMxsaNmh3EAv-VE8DGBwlL9LMBLU4,223107
|
|
63
|
+
a_sync/a_sync/flags.cp310-win_amd64.pyd,sha256=D1clJIOlvY-jwG7HwxbuuOtBQCWaQKoHa4dcuGwNlO0,19456
|
|
64
|
+
a_sync/a_sync/flags.pxd,sha256=TThtgjklqi3JfeIfxp-En5NUQxAwuiJv0GtWAC1BdUM,2310
|
|
65
|
+
a_sync/a_sync/flags.pyi,sha256=3KofIEWkZkhht-v2t7U6PqGjx4Yf1O7hARgP8ASS-f0,2303
|
|
66
|
+
a_sync/a_sync/flags.pyx,sha256=V0uVMV6SUTYkjYAi6h4n060f9cHn3TRn-csVLsHe9rA,2377
|
|
67
|
+
a_sync/a_sync/function.c,sha256=oiL6M9sQEETKH1k-vPeplPmv0GWWvsVH6LBbJ-2bFh4,1845257
|
|
68
|
+
a_sync/a_sync/function.cp310-win_amd64.pyd,sha256=Ol7EuAxU_K_B6PrcAj8U94Vye1GSxhDnhXfxTQp67U0,295424
|
|
69
|
+
a_sync/a_sync/function.pxd,sha256=lQxdI1TT5i1BuJ0RyjC6lVfHYqLOY7-Je4o3rlIUxPs,858
|
|
70
|
+
a_sync/a_sync/function.pyi,sha256=l1DCBK43VMBA_DEAscuiVsUu4fq11nyqpGS9YjfkQVg,18561
|
|
71
|
+
a_sync/a_sync/function.pyx,sha256=-9xBb4EDGDnumuzuD2UqvbDYEM_GQn1Mkf0braK27MI,47781
|
|
72
|
+
a_sync/a_sync/method.c,sha256=fkvTE2PlkkwEpujbCVzpeSzcIXmOgSCNb6hA8m_VGg4,1472100
|
|
73
|
+
a_sync/a_sync/method.cp310-win_amd64.pyd,sha256=186NsC95FEg2Qm4s1mgXLIoXBpzD08uVlhJOpsAkCLs,247296
|
|
74
|
+
a_sync/a_sync/method.pxd,sha256=zuwv-bw-vpm-lrd9FwhEEiBjZFF5lc9fBdBgCBWYyrA,481
|
|
75
|
+
a_sync/a_sync/method.pyi,sha256=WuLqZAuAG11i4BMLSovJQHUX3tkeEmGC-j0aNTQ3S98,18359
|
|
76
|
+
a_sync/a_sync/method.pyx,sha256=86HbaKU3EUj4uHffWxdmW297QGDDre89HPIxJHqUo4s,37169
|
|
77
|
+
a_sync/a_sync/property.c,sha256=y5KP4E8h9MsV8wK95j0LfOgZfqTHUJKbiEX_fw2hC2g,1302694
|
|
78
|
+
a_sync/a_sync/property.cp310-win_amd64.pyd,sha256=TEEhil5tJpNoZ50qmbBGFTsir6T-9LplVl6kx-mKO8c,214528
|
|
79
|
+
a_sync/a_sync/property.pyi,sha256=2-6xOI9RUOzZVEF_teH8Qd5tU-2R5ym1l4hYOdRs-1I,14056
|
|
80
|
+
a_sync/a_sync/property.pyx,sha256=R2Ogiih07759KIcz7GnUrArbBnp6WTbHNZIfcprniOk,28610
|
|
81
|
+
a_sync/a_sync/singleton.py,sha256=jTKNWUQeOWzQuswgquqP10ndq5-H8a4f0uYZvfpXIOw,2555
|
|
82
|
+
a_sync/a_sync/modifiers/__init__.pxd,sha256=17tPpMY2ByVbMGIpI5kiP3WX8V9IM5ZHJp0Y3eT6LvE,60
|
|
83
|
+
a_sync/a_sync/modifiers/__init__.py,sha256=taOyVb9G14B4hkM3Si5_rAP7pKF_Aeq9KZFCNPAVLLU,4260
|
|
84
|
+
a_sync/a_sync/modifiers/limiter.py,sha256=jt9FpK98AYZXFgNUIGRM3G2J9eVJuRthajcr0KvFyeg,4435
|
|
85
|
+
a_sync/a_sync/modifiers/manager.c,sha256=pYmz4cadBUZpo7y3O4CIpKOJm4rhXluJ6yClqC1-_wk,712276
|
|
86
|
+
a_sync/a_sync/modifiers/manager.cp310-win_amd64.pyd,sha256=71812dfUf04_CKTq-hpYkA_-xpkrSZEyT8Nw1P6gYcM,95744
|
|
87
|
+
a_sync/a_sync/modifiers/manager.pxd,sha256=wj0f_5FEeXmEIoWier-OlAvV8cQt2FzoLippsoOxhQM,188
|
|
88
|
+
a_sync/a_sync/modifiers/manager.pyi,sha256=ghzuXdxNHkzZzr1fcGt6BXAT4v3EP_r0qa55LG0p4WE,6441
|
|
89
|
+
a_sync/a_sync/modifiers/manager.pyx,sha256=W8ljOPcwAhWaHqkKfLjT0e5BaW4JX_NDE7UczrampO8,9695
|
|
90
|
+
a_sync/a_sync/modifiers/semaphores.py,sha256=olY0d6nhy7czfVf7fFeX9xzy_aLF2eVYc7064jLfwMY,7089
|
|
91
|
+
a_sync/a_sync/modifiers/cache/__init__.py,sha256=BFbQlgwgQyzUY6vtaJfcHSfQQpyxWbFodidxXpEwyx8,5692
|
|
92
|
+
a_sync/a_sync/modifiers/cache/memory.py,sha256=a1qcYmrYuwp8OP8SGJGxQU-DP7JzTBA-5XXR3dCtLxs,5500
|
|
93
|
+
a_sync/async_property/__init__.pxd,sha256=EGawuQLZIz7ZZLOFmaOQAFUVvabadR0aPYBW7U4TaCo,74
|
|
94
|
+
a_sync/async_property/__init__.py,sha256=qMz555CGN4cL3VunLtS6KxtpPr_QXR2jAf7gyWflLfg,64
|
|
95
|
+
a_sync/async_property/cached.c,sha256=NS-DZ65wTMix9oFbq6PE1u08YXipqoxZtODCiwMt03k,916109
|
|
96
|
+
a_sync/async_property/cached.cp310-win_amd64.pyd,sha256=4RSNRx6m-jie3LYMpHQP4EJDjsVsKm6PGsmvA43-z1M,137728
|
|
97
|
+
a_sync/async_property/cached.pxd,sha256=unwYQ9C9VcC67hGmKO9ZZRJLNY1bH9z0sItLnMH0mVs,348
|
|
98
|
+
a_sync/async_property/cached.pyi,sha256=KPd6V8ENsM-49QUupsLCniW-fnQB8so06OiliiIvSrI,1859
|
|
99
|
+
a_sync/async_property/cached.pyx,sha256=l5W9PAuRzMjnPiBXG3imL7BrjAG0_gZyge1yJoaNe0c,6492
|
|
100
|
+
a_sync/async_property/proxy.c,sha256=F4E6BFoN_tS62XmAPw3Vppv7aNKPpuP_bhQ7FBmNhT0,1569692
|
|
101
|
+
a_sync/async_property/proxy.cp310-win_amd64.pyd,sha256=H_wBbebsY7DKwZImT8z73N4vTNVxDOwIrEPnsh5YykA,302592
|
|
102
|
+
a_sync/async_property/proxy.pxd,sha256=zWc3550KyWxwZobdiYJabB93Nq8IMpgs32JrHYPPI10,48
|
|
103
|
+
a_sync/async_property/proxy.pyi,sha256=vLG3DxScefR32MlHfnTgYPQk04BHvmi_N8hp_1COvU4,4342
|
|
104
|
+
a_sync/async_property/proxy.pyx,sha256=WgalGnGFlJnBiE28KCGloQnHxKSmDeP4HR_RQ0p0wHs,13769
|
|
105
|
+
a_sync/asyncio/__init__.pxd,sha256=HJQrseYJ2Zt7tf3thkbL5pb4I3d4L5rg_sDNaTLGDZk,341
|
|
106
|
+
a_sync/asyncio/__init__.py,sha256=Nc7RxGgRQP2EVG8k_T53eHO2hS8xQ7n6XgfSXBqyma4,6497
|
|
107
|
+
a_sync/asyncio/as_completed.c,sha256=YO_UjJh0RddpwtNEFS80Q7b25H5yy_jDLvaP0fUkN0E,828126
|
|
108
|
+
a_sync/asyncio/as_completed.cp310-win_amd64.pyd,sha256=b1yTRLq41Tsm_9iFG6Zj2-u_UzMaXgYGrEesnyNc-70,125440
|
|
109
|
+
a_sync/asyncio/as_completed.pxd,sha256=nm7WdrTBIMndSNZ1SjozFyNu8HGdDL7HftwLEHsjYew,169
|
|
110
|
+
a_sync/asyncio/as_completed.pyi,sha256=v7ao3rxDtwfvTSu6rCU3Irr0r2jPugOF3IZtLptTgmM,3862
|
|
111
|
+
a_sync/asyncio/as_completed.pyx,sha256=IS_nGBBa5wrBTa6WLTqA1FGTJshY6C3D99icOL-XJ-o,9321
|
|
112
|
+
a_sync/asyncio/create_task.c,sha256=Z9raM8uAjZZKEeMUjM3Bb3UwHVgv3nSpBnqGC1MoDx4,689675
|
|
113
|
+
a_sync/asyncio/create_task.cp310-win_amd64.pyd,sha256=DmknEnbGJXc9YEuEiCGaA0MCU13U6h5NZCvHn5e2OMQ,90624
|
|
114
|
+
a_sync/asyncio/create_task.pxd,sha256=esCVrntjoKKYKiyfdZHrWWplZ4pnoe3-rXtipOJrRkM,144
|
|
115
|
+
a_sync/asyncio/create_task.pyi,sha256=wN_pcttfJTJrA9TiTJ3qYaiLnI4ikQVFvH44c2nnJE4,1915
|
|
116
|
+
a_sync/asyncio/create_task.pyx,sha256=VQkGnZvcTLETim4TaO91i8jR_5hYrbwuBtpSszCpFhQ,8993
|
|
117
|
+
a_sync/asyncio/gather.c,sha256=g3PL_0j7PJELxHUdlMOXgkUBtw1ws6HPpORpuBdtF-U,727531
|
|
118
|
+
a_sync/asyncio/gather.cp310-win_amd64.pyd,sha256=QdLveHZs14iSxqcRUFSuGFxALSHpxkkTMjj_0jMk8XA,104448
|
|
119
|
+
a_sync/asyncio/gather.pyi,sha256=wfi_z1UZzXpq3fEyd2L9N8IVvEY_fbHHpDe2Qy32mcw,4622
|
|
120
|
+
a_sync/asyncio/gather.pyx,sha256=zCUaTcTIUl1YJLkl0WBTgrEUMCY-uVcWl-gU7eRpf5Q,8783
|
|
121
|
+
a_sync/asyncio/igather.c,sha256=9DJq-0QYG72gk2broIPUsMNt0meItP2jEVQ9Y8HNSjs,532448
|
|
122
|
+
a_sync/asyncio/igather.cp310-win_amd64.pyd,sha256=5BzYZ2Wmidu_2DVOTuQWwaLQ2IzfbEe7L8UocCrGlsw,60928
|
|
123
|
+
a_sync/asyncio/igather.pxd,sha256=M9hMUtgp6118pa0ddR9daQubvnceefnbt4pbvEl0doE,71
|
|
124
|
+
a_sync/asyncio/igather.pyi,sha256=aNLP9ViC5Cid1ikgBZUCme2XiMKiwxZEkBZWAw4_IJQ,208
|
|
125
|
+
a_sync/asyncio/igather.pyx,sha256=M6VWmCQkdZprqPCTpdz-77uj6BkZPQvupZYfr2FQDMI,6756
|
|
126
|
+
a_sync/asyncio/sleep.c,sha256=Ex2NxsA8yWxsrtN1LbU8Y2yxO4HcRsPWf-8xwRzpmcU,388348
|
|
127
|
+
a_sync/asyncio/sleep.cp310-win_amd64.pyd,sha256=kRVOcu7HbHQ13jBS9UdbFm9FMFDpVhgJpl6hjUMHcrM,43008
|
|
128
|
+
a_sync/asyncio/sleep.pyi,sha256=zy3g-AE9OF3SUrGm5cVlRcK7uVwkV4DBjXF0D_dqSsU,551
|
|
129
|
+
a_sync/asyncio/sleep.pyx,sha256=GR6sv4AswrGMpF36Bz5Boelqvz5rlNNNA9UtEZj33fo,1322
|
|
130
|
+
a_sync/primitives/__init__.pxd,sha256=FIO-eD4HaJ259mz3XB6HE1YF4tDej6ojrxQ_kx-tMwM,38
|
|
131
|
+
a_sync/primitives/__init__.py,sha256=LSzq3o0aXdwb-g96_YubEu3MmI1uA3FWwdbsE8wTS0Y,1695
|
|
132
|
+
a_sync/primitives/_debug.c,sha256=oAw8vpkUAoGhLfweu0gVMqL3ZhEm2Bfu7zN6xRva2fA,684190
|
|
133
|
+
a_sync/primitives/_debug.cp310-win_amd64.pyd,sha256=Na3dD8ENCkKYNOi7kFWJkolL64TEquNyJzGdXrGFqCw,93184
|
|
134
|
+
a_sync/primitives/_debug.pxd,sha256=EK81O2ckrn3E8uwoU_R2Gorx6myk5Pt_v2Ike8ME1q4,476
|
|
135
|
+
a_sync/primitives/_debug.pyi,sha256=hEWnWusF3jh-hc3gYenX76WAuMXtyopsAXFzrDAWXlw,2227
|
|
136
|
+
a_sync/primitives/_debug.pyx,sha256=oT_H6VB_Ng3K8iwQTcAF2n5Y5Ks1nm-vW3XE1dehdBI,8072
|
|
137
|
+
a_sync/primitives/_loggable.c,sha256=Qq5xwQJs8vnBKc_urkr2IuAHX4JPsU9EJMIn78GPKzk,490158
|
|
138
|
+
a_sync/primitives/_loggable.cp310-win_amd64.pyd,sha256=Ya3XyKRrxpqBZux_OoQUKgar33cB9iusXm2HrvckxOw,58880
|
|
139
|
+
a_sync/primitives/_loggable.pxd,sha256=diuZ-6UFy8PKj2wzhq4TLiAO9WDl4zmdNXJMtxAs7jA,136
|
|
140
|
+
a_sync/primitives/_loggable.pyi,sha256=RpLX46Tb3xrpQGWfniENNFgM0-PTcaZtvzuGS-Z0X2M,2000
|
|
141
|
+
a_sync/primitives/_loggable.pyx,sha256=MZ4cVSib3xWgYHNsu1FCSW6G13yCqaEV2eVAmIeLMCU,3105
|
|
142
|
+
a_sync/primitives/queue.py,sha256=3f1cRAjqt48BJQHaqXwzFBxCilQxuk-eNcyPTkctiQo,34310
|
|
143
|
+
a_sync/primitives/locks/__init__.pxd,sha256=RwmeBP3FZ8uMGxmpfeRkKumqF8awArLuQvNMHurZoDU,310
|
|
144
|
+
a_sync/primitives/locks/__init__.py,sha256=3HUsoO6Bim8rn9uL9XJ5tPHfqA2TKe6-d_60CDMMfQU,453
|
|
145
|
+
a_sync/primitives/locks/counter.c,sha256=sCPQURqEmgFB-3vyWSfjpQzlYJBxdN3x6IS6y4RfOJE,799920
|
|
146
|
+
a_sync/primitives/locks/counter.cp310-win_amd64.pyd,sha256=4ax85yIz_ZGsffjFodrZ-A-znwTuTow6ThGCoGqPXOs,105984
|
|
147
|
+
a_sync/primitives/locks/counter.pxd,sha256=gnzExZDKySYNDeNuy1r8WygP6lwj8y1QsJc4Htto3lw,421
|
|
148
|
+
a_sync/primitives/locks/counter.pyi,sha256=YPilGVSVIqsZ-Dig66FlTS7qlg7rIPqBCtnyhLVq_PA,5228
|
|
149
|
+
a_sync/primitives/locks/counter.pyx,sha256=7MVhLuqYPYvFG51e6hRFJSqXwnxT9-iH4inIt6YWfDU,9315
|
|
150
|
+
a_sync/primitives/locks/event.c,sha256=2BmiF4fj3dcOWnh3w2dfHdqOrjSzXI4QyXfmW5jme3o,745857
|
|
151
|
+
a_sync/primitives/locks/event.cp310-win_amd64.pyd,sha256=vUy9bYESm1Qgl8otVz79BoHO8NJ3Khw-9d36XNJicXE,99840
|
|
152
|
+
a_sync/primitives/locks/event.pxd,sha256=nB_Su_K05uYlCp3hlFv0KQhUYQ7spsZKb-9I4cyA-Po,717
|
|
153
|
+
a_sync/primitives/locks/event.pyi,sha256=8WiCAzARjugBY4AoedpDqlfdt2VdynYgrP-HhEiX7Pw,1499
|
|
154
|
+
a_sync/primitives/locks/event.pyx,sha256=ybzomSEg6Focpj0Q75camw1-Cxm1V7aDe6tFGnfDGIw,6234
|
|
155
|
+
a_sync/primitives/locks/prio_semaphore.c,sha256=KSrE_ihHrn74qXUln85nzmFl_kms1WqS3Xp5v5d9yHU,1258651
|
|
156
|
+
a_sync/primitives/locks/prio_semaphore.cp310-win_amd64.pyd,sha256=Q995kgfgINm6zSzcJ5zq4hT8x_Rj7P1Gv28Ms7HpdlE,162304
|
|
157
|
+
a_sync/primitives/locks/prio_semaphore.pxd,sha256=3wLcicrWU5A-melPp8eR_0G7fz57G0MqasjjurSCmyM,1066
|
|
158
|
+
a_sync/primitives/locks/prio_semaphore.pyi,sha256=K7xamQJjh4TGplcmNFHUjaBfr9mfwCEK9st8-YztGHI,7847
|
|
159
|
+
a_sync/primitives/locks/prio_semaphore.pyx,sha256=YZ6Ur0IzNK9mPP2pNiBzzGSGEqywHbxKHzSGcG0bwGA,22693
|
|
160
|
+
a_sync/primitives/locks/semaphore.c,sha256=ayJ1fS7kLkNsn45ywFgDHDdzPpqiWp-y3zp5EyRBE_g,1238950
|
|
161
|
+
a_sync/primitives/locks/semaphore.cp310-win_amd64.pyd,sha256=EcCgsbcnsPsviSVxmJFBtaw65MwMxcZA-ttSVh2GArE,167936
|
|
162
|
+
a_sync/primitives/locks/semaphore.pxd,sha256=SyiWMzUyY12YFDvnzGQbjc2Xp5uBeWrrbzzjDn5vjQY,606
|
|
163
|
+
a_sync/primitives/locks/semaphore.pyi,sha256=Y7IFyCEQuNQpk6QKQsbbOfi422EIwHbMH4iCe2jKfu8,6220
|
|
164
|
+
a_sync/primitives/locks/semaphore.pyx,sha256=UFbg5MCaR3-daWh011JqAfARy9mrldKl__Ox0AFca_g,15419
|
|
165
|
+
a_sync/sphinx/__init__.py,sha256=Yzbm8ZcfWSf47WFzQbD25rJAoEXJ5zH9-xytRXJ6LBc,52
|
|
166
|
+
a_sync/sphinx/ext.py,sha256=ID0YgAYrUuVml2lU5m-1T7Os6U2tq31BdE6kA3ic8Ag,9206
|
|
167
|
+
a_sync/utils/__init__.py,sha256=RL6TMpTccKytj3nft1iDRbNQCL4zy27BO7J3zwYBg5Y,3318
|
|
168
|
+
a_sync/utils/iterators.py,sha256=QhXHC2pU-KR_1Icdg3heYt3O53JMqtIrbAMH1M9t3zk,11352
|
|
169
|
+
a_sync/utils/repr.c,sha256=a-E8yJFaohNa_TLcOfg_LVyb2JYZmJbNvtH8N504CEY,669294
|
|
170
|
+
a_sync/utils/repr.cp310-win_amd64.pyd,sha256=OVhGydx0s__1UsntP7QXwvU77exVRwvj_UnMm2W52Mc,85504
|
|
171
|
+
a_sync/utils/repr.pyi,sha256=rderVJevHMbNST7yN9mWkDCdfBUBwhluuuUmAPiK60U,133
|
|
172
|
+
a_sync/utils/repr.pyx,sha256=xjS2rosYFHzpfy9ccdNVSAWOzX8JDE35hrwUiJUuqNM,2705
|
|
173
|
+
ez_a_sync-0.32.29.dist-info/licenses/LICENSE.txt,sha256=m-MQLU0LnrbQRgqugjggMDXxTe0meMb8HwioffmuEIM,1091
|
|
174
|
+
ez_a_sync-0.32.29.dist-info/METADATA,sha256=TaDLg6ELs2W4yqj6KvMM9CDvWaVadq99LJ4yttcEEus,13564
|
|
175
|
+
ez_a_sync-0.32.29.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
176
|
+
ez_a_sync-0.32.29.dist-info/top_level.txt,sha256=ew2xVyFeZE_a5XMEL64h7-vJIbaBQieaFcvBAWUpU_s,7
|
|
177
|
+
ez_a_sync-0.32.29.dist-info/RECORD,,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
Copyright (c) 2023 Posted On The Block LLC
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all
|
|
10
|
+
copies or substantial portions of the Software.
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
14
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
15
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
16
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
17
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a_sync
|