Jedutils 0.2.7__tar.gz → 0.2.7.dev0__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.7 → jedutils-0.2.7.dev0}/Jedutils.egg-info/PKG-INFO +2 -13
  2. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/PKG-INFO +2 -13
  3. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/__init__.py +1 -1
  4. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/_async_redis_pipe.py +9 -11
  5. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/Jedutils.egg-info/SOURCES.txt +0 -0
  6. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/Jedutils.egg-info/dependency_links.txt +0 -0
  7. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/Jedutils.egg-info/requires.txt +0 -0
  8. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/Jedutils.egg-info/top_level.txt +0 -0
  9. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/LICENSE +0 -0
  10. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/MANIFEST.in +0 -0
  11. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/README.md +0 -0
  12. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/__init__.py +0 -0
  13. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/_concurrency_manager.py +0 -0
  14. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/_run_async.py +0 -0
  15. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/_rwlock.py +0 -0
  16. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/network/__init__.py +0 -0
  17. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/asyncio/network/_dl.py +0 -0
  18. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/base62/__init__.py +0 -0
  19. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/base62/b62.py +0 -0
  20. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/databases/__init__.py +0 -0
  21. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/databases/_in_memory.py +0 -0
  22. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/math/__init__.py +0 -0
  23. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/math/_number_formatter.py +0 -0
  24. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/strings/__init__.py +0 -0
  25. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/strings/_chunked_text.py +0 -0
  26. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/strings/_numerals.py +0 -0
  27. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/strings/_random_string.py +0 -0
  28. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/tdlib/__init__.py +0 -0
  29. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/jedutils/tdlib/arithmetic.py +0 -0
  30. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/setup.cfg +0 -0
  31. {jedutils-0.2.7 → jedutils-0.2.7.dev0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: Jedutils
3
- Version: 0.2.7
3
+ Version: 0.2.7.dev0
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
@@ -14,17 +14,6 @@ License-File: LICENSE
14
14
  Provides-Extra: all
15
15
  Requires-Dist: redis; extra == "all"
16
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
28
17
 
29
18
  # 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)
30
19
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: Jedutils
3
- Version: 0.2.7
3
+ Version: 0.2.7.dev0
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
@@ -14,17 +14,6 @@ License-File: LICENSE
14
14
  Provides-Extra: all
15
15
  Requires-Dist: redis; extra == "all"
16
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
28
17
 
29
18
  # 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)
30
19
 
@@ -1,3 +1,3 @@
1
- __version__ = "0.2.7"
1
+ __version__ = "0.2.7dev0"
2
2
  __copyright__ = "Copyright (c) 2023-2024 AYMEN Mohammed ~ https://github.com/AYMENJD"
3
3
  __license__ = "MIT License"
@@ -21,8 +21,6 @@ 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.
26
24
  """
27
25
 
28
26
  def __init__(
@@ -96,19 +94,15 @@ class AsyncRedisPipe:
96
94
  if self.debug:
97
95
  self.logger.debug(f"Executing command: {data[1]}")
98
96
 
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
-
97
+ pipe.execute_command(*data[1])
105
98
  futures.append(data[0])
106
99
  count += 1
107
100
 
108
101
  self.__loop.create_task(self.__handle_pipe_line(futures, pipe))
109
102
 
110
103
  async def __handle_pipe_line(self, futures: list, pipe):
111
- for x, result in enumerate((await pipe.execute(False))):
104
+ results = await pipe.execute(False)
105
+ for x, result in enumerate(results):
112
106
  if self.debug:
113
107
  self.logger.debug(f"Result: {result}")
114
108
 
@@ -118,9 +112,13 @@ class AsyncRedisPipe:
118
112
  futures[x].set_result(result)
119
113
 
120
114
  def __getattr__(self, name):
121
- def wrapper(*args, **kwargs):
115
+ if name == "delete":
116
+ name = "del"
117
+
118
+ def wrapper(*args):
122
119
  fut = asyncio.Future()
123
- self.__queue.put_nowait((fut, name, args, kwargs))
120
+ args = (name,) + args
121
+ self.__queue.put_nowait((fut, args))
124
122
  return fut
125
123
 
126
124
  return wrapper
File without changes
File without changes
File without changes
File without changes
File without changes