bear-utils 0.7.12__py3-none-any.whl → 0.7.13__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.
bear_utils/__init__.py CHANGED
@@ -1,3 +1,5 @@
1
+ from importlib.metadata import version
2
+
1
3
  from bear_epoch_time import EpochTimestamp, TimeTools
2
4
 
3
5
  from .cache import CacheWrapper, cache, cache_factory
@@ -10,4 +12,4 @@ from .logging.logger_manager._common import VERBOSE_CONSOLE_FORMAT
10
12
  from .logging.logger_manager._styles import VERBOSE
11
13
  from .logging.loggers import BaseLogger, BufferLogger, ConsoleLogger, FileLogger
12
14
 
13
- __version__ = "0.7.12"
15
+ __version__: str = version("bear-utils")
@@ -1 +1,23 @@
1
- from bear_epoch_time.constants.date_related import DATE_FORMAT, DATE_TIME_FORMAT
1
+ from bear_epoch_time.constants.date_related import (
2
+ DATE_FORMAT,
3
+ DATE_TIME_FORMAT,
4
+ DT_FORMAT_WITH_SECONDS,
5
+ DT_FORMAT_WITH_TZ,
6
+ DT_FORMAT_WITH_TZ_AND_SECONDS,
7
+ ET_TIME_ZONE,
8
+ PT_TIME_ZONE,
9
+ TIME_FORMAT_WITH_SECONDS,
10
+ UTC_TIME_ZONE,
11
+ )
12
+
13
+ __all__ = [
14
+ "DATE_FORMAT",
15
+ "DATE_TIME_FORMAT",
16
+ "DT_FORMAT_WITH_SECONDS",
17
+ "DT_FORMAT_WITH_TZ",
18
+ "DT_FORMAT_WITH_TZ_AND_SECONDS",
19
+ "ET_TIME_ZONE",
20
+ "PT_TIME_ZONE",
21
+ "TIME_FORMAT_WITH_SECONDS",
22
+ "UTC_TIME_ZONE",
23
+ ]
@@ -129,6 +129,20 @@ def copy_to_clipboard(output: str) -> int:
129
129
  return loop.run_until_complete(clipboard_manager.copy(output))
130
130
 
131
131
 
132
+ async def copy_to_clipboard_async(output: str) -> int:
133
+ """
134
+ Asynchronously copy the output to the clipboard.
135
+
136
+ Args:
137
+ output (str): The output to copy to the clipboard.
138
+
139
+ Returns:
140
+ int: The return code of the command.
141
+ """
142
+ clipboard_manager = ClipboardManager()
143
+ return await clipboard_manager.copy(output)
144
+
145
+
132
146
  def paste_from_clipboard() -> str:
133
147
  """
134
148
  Paste the output from the clipboard.
@@ -141,6 +155,17 @@ def paste_from_clipboard() -> str:
141
155
  return loop.run_until_complete(clipboard_manager.paste())
142
156
 
143
157
 
158
+ async def paste_from_clipboard_async() -> str:
159
+ """
160
+ Asynchronously paste the output from the clipboard.
161
+
162
+ Returns:
163
+ str: The content of the clipboard.
164
+ """
165
+ clipboard_manager = ClipboardManager()
166
+ return await clipboard_manager.paste()
167
+
168
+
144
169
  def clear_clipboard() -> int:
145
170
  """
146
171
  Clear the clipboard.
@@ -153,6 +178,17 @@ def clear_clipboard() -> int:
153
178
  return loop.run_until_complete(clipboard_manager.clear())
154
179
 
155
180
 
181
+ async def clear_clipboard_async() -> int:
182
+ """
183
+ Asynchronously clear the clipboard.
184
+
185
+ Returns:
186
+ int: The return code of the command.
187
+ """
188
+ clipboard_manager = ClipboardManager()
189
+ return await clipboard_manager.clear()
190
+
191
+
156
192
  def fmt_header(
157
193
  title: str,
158
194
  sep: str = "#",
@@ -89,5 +89,3 @@ DEFAULT_STYLES: dict[str, str] = {**{method: info["style"] for method, info in L
89
89
  """Just the styles of the logger methods, used to create the theme."""
90
90
 
91
91
  DEFAULT_THEME = Theme(styles=DEFAULT_STYLES)
92
-
93
- print(DEFAULT_STYLES)
@@ -1,5 +1,15 @@
1
1
  from bear_epoch_time import EpochTimestamp, TimerData, TimeTools, add_ord_suffix, create_timer, timer
2
- from bear_epoch_time.constants.date_related import DATE_FORMAT, DATE_TIME_FORMAT
2
+ from bear_epoch_time.constants.date_related import (
3
+ DATE_FORMAT,
4
+ DATE_TIME_FORMAT,
5
+ DT_FORMAT_WITH_SECONDS,
6
+ DT_FORMAT_WITH_TZ,
7
+ DT_FORMAT_WITH_TZ_AND_SECONDS,
8
+ ET_TIME_ZONE,
9
+ PT_TIME_ZONE,
10
+ TIME_FORMAT_WITH_SECONDS,
11
+ UTC_TIME_ZONE,
12
+ )
3
13
 
4
14
  __all__ = [
5
15
  "EpochTimestamp",
@@ -10,4 +20,11 @@ __all__ = [
10
20
  "add_ord_suffix",
11
21
  "DATE_FORMAT",
12
22
  "DATE_TIME_FORMAT",
23
+ "DT_FORMAT_WITH_SECONDS",
24
+ "DT_FORMAT_WITH_TZ",
25
+ "DT_FORMAT_WITH_TZ_AND_SECONDS",
26
+ "ET_TIME_ZONE",
27
+ "PT_TIME_ZONE",
28
+ "TIME_FORMAT_WITH_SECONDS",
29
+ "UTC_TIME_ZONE",
13
30
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bear-utils
3
- Version: 0.7.12
3
+ Version: 0.7.13
4
4
  Summary: Various utilities for Bear programmers, including a rich logging utility, a disk cache, and a SQLite database wrapper amongst other things.
5
5
  Author: chaz
6
6
  Author-email: bright.lid5647@fastmail.com
@@ -23,7 +23,7 @@ Requires-Dist: singleton-base (>=1.0.5)
23
23
  Requires-Dist: sqlalchemy (>=2.0.40,<3.0.0)
24
24
  Description-Content-Type: text/markdown
25
25
 
26
- # Bear Utils v# Bear Utils v0.7.12
26
+ # Bear Utils v# Bear Utils v0.7.13
27
27
 
28
28
  Personal set of tools and utilities for Python projects, focusing on modularity and ease of use. This library includes components for caching, database management, logging, time handling, file operations, CLI prompts, image processing, clipboard interaction, gradient utilities, event systems, and async helpers.
29
29
 
@@ -1,4 +1,4 @@
1
- bear_utils/__init__.py,sha256=Wv20pojGSsmvYwUJDinz8OltznbZuIV4PUQOYF7cdZA,612
1
+ bear_utils/__init__.py,sha256=rwxVGk0zD-vvQ_E1SFHSIX3nmz9potELv129Q7j8Tkw,670
2
2
  bear_utils/ai/__init__.py,sha256=g7DiwwqbcKAktcwqq6Xs3rSwFqvq4H1yrG2aHoc6FQo,766
3
3
  bear_utils/ai/ai_helpers/__init__.py,sha256=siujxR7b7mjsHM2J24V9NXM-edlgcuRZQpxegVU9-is,3968
4
4
  bear_utils/ai/ai_helpers/_common.py,sha256=KgaOb_IePfC8Z1VsdA0EiodfS_YGVYYnrZFR2ZdsUYM,418
@@ -20,7 +20,7 @@ bear_utils/config/settings_manager.py,sha256=1icasrvSmhgPS08fGFswYT7eHbbguqscFZg
20
20
  bear_utils/constants/__init__.py,sha256=exQ6tfE05Wi72i6PyZ71WXRs_b9RO4zbupPUyV6fHQg,545
21
21
  bear_utils/constants/_exceptions.py,sha256=KCd4iT7RxrS4DxU1vLrTiYP2U6pyEjnyP_AGXbEpwR0,137
22
22
  bear_utils/constants/_lazy_typing.py,sha256=WfuWpRqx9XchvuyPWg3tVjMC5-C4QA-Bhwfskf4YmAE,339
23
- bear_utils/constants/date_related.py,sha256=GabqI9xLBDiIEBZ7zJ3UNbsqOUOWZr3wJCPAqAuXZfk,81
23
+ bear_utils/constants/date_related.py,sha256=EpQEZxg8o9e4pkvbflfnSyYUzb-pQDhCxAJKWpiWuT8,508
24
24
  bear_utils/constants/time_related.py,sha256=q-0wi0qnC5qHq4vOXbMAETVA5lEc-c7STFqi3fTjuLs,638
25
25
  bear_utils/database/__init__.py,sha256=JkpeqL9F1Rhcj9CMhM6ZP72qq-nDKPzWAR2aeJyyiZg,111
26
26
  bear_utils/database/_db_manager.py,sha256=1EY8ueSf3US8yUhnMP5R96pHolOyy_3ufNi5fv5d-NM,3776
@@ -29,7 +29,7 @@ bear_utils/events/events_class.py,sha256=pEdZNS8l5wwrn3I4WrFspZlNiy3Lzcwjxr6E2hT
29
29
  bear_utils/events/events_module.py,sha256=NtWqlBpTWAtaC_KVJnweReQe6OU2PXt04yNtAEcATuc,1852
30
30
  bear_utils/extras/__init__.py,sha256=OzjuT-GSI6lT8lmOLBR4-ikA-QrpByy0YRlgiFd7cF4,547
31
31
  bear_utils/extras/_async_helpers.py,sha256=OcgPmCfdAKcTsqGA3Fm8ORkePgaJSok_1t9-sbf-zNQ,416
32
- bear_utils/extras/_tools.py,sha256=8l41jRIiyNTI9LmBC5MM-rx9nyx9wmmVwk_h980B388,6110
32
+ bear_utils/extras/_tools.py,sha256=yWv-vH0KG_op3zwyxPTYVR1LLGUP6E9tYO5tWVr7Sp4,6965
33
33
  bear_utils/extras/platform_utils.py,sha256=vRLybOm_Kk4ysVyNdsv1oTrMHD64vPeGre23fg-kJxI,1257
34
34
  bear_utils/extras/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  bear_utils/extras/wrappers/add_methods.py,sha256=8JI9oFakHRBHcyix6sgqfiXZyXW5antLbyRdFL4F1_M,4222
@@ -57,7 +57,7 @@ bear_utils/logging/__init__.py,sha256=o5MX0ow4ugo3JhS2k9vFO0HMzTwUBVnzdhoJBCmqW1
57
57
  bear_utils/logging/logger_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  bear_utils/logging/logger_manager/_common.py,sha256=6r69PIqk6IaIauxax35c5Paz1J1iv87ukbvoZ3uWI_Q,1582
59
59
  bear_utils/logging/logger_manager/_console_junk.py,sha256=vMChuVTNxyxly-onEad1u2tsb6syalXjFVfxOS2-qHw,4821
60
- bear_utils/logging/logger_manager/_styles.py,sha256=MrtERJMZ2yFOlnm2dVYPT2gNvxYZ-Yk2NocGSkPeDx4,2551
60
+ bear_utils/logging/logger_manager/_styles.py,sha256=Q5Gwt7nmHZuanwpr3kJl7mfo_8jaElFKJgns1sq4IwE,2528
61
61
  bear_utils/logging/logger_manager/loggers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  bear_utils/logging/logger_manager/loggers/_base_logger.py,sha256=LnhPJuTChhgXsxrafJBE1w7aIntn5OW43ZOjFxwhysU,9453
63
63
  bear_utils/logging/logger_manager/loggers/_base_logger.pyi,sha256=fFjv7GHh9LAvBZDK5Bqth50wOheNwM_qt-sKowW8UWg,2606
@@ -72,7 +72,7 @@ bear_utils/logging/logger_manager/loggers/_sub_logger.pyi,sha256=-SCh73lTkqolDq-
72
72
  bear_utils/logging/loggers.py,sha256=oFdKrm9ot7F4pKghzYQrq-BK7RfevKQSBaHsmSolHTA,3196
73
73
  bear_utils/monitoring/__init__.py,sha256=cj7UYsipfYFwxQmXtMpziAv4suRtGzWEdjdwOCbxJN4,168
74
74
  bear_utils/monitoring/host_monitor.py,sha256=GwIK9X8rATUhYIbOXi4MINfACWgO3T1vzUK1gSK_TQc,12902
75
- bear_utils/time/__init__.py,sha256=MN_uAgNj29WEBQDSnwcASfVcsv4E_kNZU9RmuOPrtuE,352
76
- bear_utils-0.7.12.dist-info/METADATA,sha256=wrJ42KLfTbrkEwQyr5WVT8c-M6aEhKiNUNHrRHu1o7k,7494
77
- bear_utils-0.7.12.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
78
- bear_utils-0.7.12.dist-info/RECORD,,
75
+ bear_utils/time/__init__.py,sha256=EHzc9KiGG3l6mAPhiIeFcYqxQG_w0QQ1ES3yRFVr8ug,721
76
+ bear_utils-0.7.13.dist-info/METADATA,sha256=dHAvl1Tw3g0DKioUO3m7KkQay-L_wTFCMxDIoKQy_qc,7494
77
+ bear_utils-0.7.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
78
+ bear_utils-0.7.13.dist-info/RECORD,,