Jedutils 0.2.6__tar.gz → 0.2.7__tar.gz

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 (31) hide show
  1. {Jedutils-0.2.6 → jedutils-0.2.7}/Jedutils.egg-info/PKG-INFO +16 -6
  2. {Jedutils-0.2.6 → jedutils-0.2.7}/PKG-INFO +16 -6
  3. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/__init__.py +1 -1
  4. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/_async_redis_pipe.py +11 -9
  5. {Jedutils-0.2.6 → jedutils-0.2.7}/Jedutils.egg-info/SOURCES.txt +0 -0
  6. {Jedutils-0.2.6 → jedutils-0.2.7}/Jedutils.egg-info/dependency_links.txt +0 -0
  7. {Jedutils-0.2.6 → jedutils-0.2.7}/Jedutils.egg-info/requires.txt +0 -0
  8. {Jedutils-0.2.6 → jedutils-0.2.7}/Jedutils.egg-info/top_level.txt +0 -0
  9. {Jedutils-0.2.6 → jedutils-0.2.7}/LICENSE +0 -0
  10. {Jedutils-0.2.6 → jedutils-0.2.7}/MANIFEST.in +0 -0
  11. {Jedutils-0.2.6 → jedutils-0.2.7}/README.md +0 -0
  12. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/__init__.py +0 -0
  13. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/_concurrency_manager.py +0 -0
  14. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/_run_async.py +0 -0
  15. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/_rwlock.py +0 -0
  16. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/network/__init__.py +0 -0
  17. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/asyncio/network/_dl.py +0 -0
  18. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/base62/__init__.py +0 -0
  19. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/base62/b62.py +0 -0
  20. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/databases/__init__.py +0 -0
  21. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/databases/_in_memory.py +0 -0
  22. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/math/__init__.py +0 -0
  23. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/math/_number_formatter.py +0 -0
  24. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/strings/__init__.py +0 -0
  25. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/strings/_chunked_text.py +0 -0
  26. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/strings/_numerals.py +0 -0
  27. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/strings/_random_string.py +0 -0
  28. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/tdlib/__init__.py +0 -0
  29. {Jedutils-0.2.6 → jedutils-0.2.7}/jedutils/tdlib/arithmetic.py +0 -0
  30. {Jedutils-0.2.6 → jedutils-0.2.7}/setup.cfg +0 -0
  31. {Jedutils-0.2.6 → jedutils-0.2.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: Jedutils
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Jedutils is a Python utilities package that provides a collection of useful helper functions.
5
5
  Home-page: https://github.com/AYMENJD/jedutils
6
6
  Author: AYMEN Mohammed
@@ -9,10 +9,22 @@ License: MIT
9
9
  Project-URL: Source, https://github.com/AYMENJD/jedutils
10
10
  Project-URL: Tracker, https://github.com/AYMENJD/jedutils/issues
11
11
  Keywords: utilities,tools,library,helper,functions,development
12
- Platform: UNKNOWN
13
12
  Description-Content-Type: text/markdown
14
- Provides-Extra: all
15
13
  License-File: LICENSE
14
+ Provides-Extra: all
15
+ Requires-Dist: redis; extra == "all"
16
+ Requires-Dist: aiohttp; extra == "all"
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: keywords
23
+ Dynamic: license
24
+ Dynamic: license-file
25
+ Dynamic: project-url
26
+ Dynamic: provides-extra
27
+ Dynamic: summary
16
28
 
17
29
  # Jedutils [![Version](https://img.shields.io/pypi/v/jedutils?style=flat&logo=pypi)](https://pypi.org/project/jedutils) [![Downloads](https://static.pepy.tech/personalized-badge/jedutils?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/jedutils)
18
30
 
@@ -38,5 +50,3 @@ Contributions to Jedutils are welcome! If you have an idea for a new utility or
38
50
  ## License
39
51
 
40
52
  Jedutils is licensed under the MIT License. See the `LICENSE` file for details.
41
-
42
-
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: Jedutils
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Jedutils is a Python utilities package that provides a collection of useful helper functions.
5
5
  Home-page: https://github.com/AYMENJD/jedutils
6
6
  Author: AYMEN Mohammed
@@ -9,10 +9,22 @@ License: MIT
9
9
  Project-URL: Source, https://github.com/AYMENJD/jedutils
10
10
  Project-URL: Tracker, https://github.com/AYMENJD/jedutils/issues
11
11
  Keywords: utilities,tools,library,helper,functions,development
12
- Platform: UNKNOWN
13
12
  Description-Content-Type: text/markdown
14
- Provides-Extra: all
15
13
  License-File: LICENSE
14
+ Provides-Extra: all
15
+ Requires-Dist: redis; extra == "all"
16
+ Requires-Dist: aiohttp; extra == "all"
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: keywords
23
+ Dynamic: license
24
+ Dynamic: license-file
25
+ Dynamic: project-url
26
+ Dynamic: provides-extra
27
+ Dynamic: summary
16
28
 
17
29
  # Jedutils [![Version](https://img.shields.io/pypi/v/jedutils?style=flat&logo=pypi)](https://pypi.org/project/jedutils) [![Downloads](https://static.pepy.tech/personalized-badge/jedutils?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/jedutils)
18
30
 
@@ -38,5 +50,3 @@ Contributions to Jedutils are welcome! If you have an idea for a new utility or
38
50
  ## License
39
51
 
40
52
  Jedutils is licensed under the MIT License. See the `LICENSE` file for details.
41
-
42
-
@@ -1,3 +1,3 @@
1
- __version__ = "0.2.6"
1
+ __version__ = "0.2.7"
2
2
  __copyright__ = "Copyright (c) 2023-2024 AYMEN Mohammed ~ https://github.com/AYMENJD"
3
3
  __license__ = "MIT License"
@@ -21,6 +21,8 @@ class AsyncRedisPipe:
21
21
  >>> redis_calls = [pipe.get("key") for i in range(100000)]
22
22
  >>> await asyncio.gather(*redis_calls) # 100K Concurrent redis calls
23
23
 
24
+ Disclaimer:
25
+ This class is intended to be used with basic redis commands, other non redis commands (a.k.a client side commands) are not supported (eg. `redis.lock`) and such call can have unexpected behavior.
24
26
  """
25
27
 
26
28
  def __init__(
@@ -94,15 +96,19 @@ class AsyncRedisPipe:
94
96
  if self.debug:
95
97
  self.logger.debug(f"Executing command: {data[1]}")
96
98
 
97
- pipe.execute_command(*data[1])
99
+ try:
100
+ getattr(pipe, data[1])(*data[2], **data[3])
101
+ except Exception as e:
102
+ data[0].set_exception(e)
103
+ continue
104
+
98
105
  futures.append(data[0])
99
106
  count += 1
100
107
 
101
108
  self.__loop.create_task(self.__handle_pipe_line(futures, pipe))
102
109
 
103
110
  async def __handle_pipe_line(self, futures: list, pipe):
104
- results = await pipe.execute(False)
105
- for x, result in enumerate(results):
111
+ for x, result in enumerate((await pipe.execute(False))):
106
112
  if self.debug:
107
113
  self.logger.debug(f"Result: {result}")
108
114
 
@@ -112,13 +118,9 @@ class AsyncRedisPipe:
112
118
  futures[x].set_result(result)
113
119
 
114
120
  def __getattr__(self, name):
115
- if name == "delete":
116
- name = "del"
117
-
118
- def wrapper(*args):
121
+ def wrapper(*args, **kwargs):
119
122
  fut = asyncio.Future()
120
- args = (name,) + args
121
- self.__queue.put_nowait((fut, args))
123
+ self.__queue.put_nowait((fut, name, args, kwargs))
122
124
  return fut
123
125
 
124
126
  return wrapper
File without changes
File without changes
File without changes
File without changes
File without changes