bear-utils 0.8.0__py3-none-any.whl → 0.8.1__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/config/settings_manager.py +1 -0
- bear_utils/logger_manager/loggers/_console_logger.pyi +1 -0
- bear_utils/logger_manager/loggers/_file_logger.py +2 -0
- bear_utils/logger_manager/loggers/_sub_logger.py +1 -0
- bear_utils/monitoring/host_monitor.py +1 -1
- {bear_utils-0.8.0.dist-info → bear_utils-0.8.1.dist-info}/METADATA +3 -3
- {bear_utils-0.8.0.dist-info → bear_utils-0.8.1.dist-info}/RECORD +8 -8
- {bear_utils-0.8.0.dist-info → bear_utils-0.8.1.dist-info}/WHEEL +0 -0
@@ -27,6 +27,7 @@ class SettingsManager:
|
|
27
27
|
self.cache: dict[str, Any] = {}
|
28
28
|
file_name: str = f"{settings_name}.json"
|
29
29
|
self.file_path: Path = Path(folder_path) / file_name if folder_path else get_config_folder() / file_name
|
30
|
+
|
30
31
|
self.db: TinyDB = TinyDB(self.file_path, indent=4, ensure_ascii=False)
|
31
32
|
|
32
33
|
atexit.register(self.close)
|
@@ -6,6 +6,7 @@ from rich.text import Text
|
|
6
6
|
from rich.theme import Theme
|
7
7
|
|
8
8
|
from bear_utils.logger_manager._console_junk import ConsoleBuffering, ConsoleHandler
|
9
|
+
from bear_utils.logging.logger_manager._console_junk import ConsoleBuffering, ConsoleHandler
|
9
10
|
|
10
11
|
from ._base_logger import BaseLogger
|
11
12
|
from ._sub_logger import SubConsoleLogger
|
@@ -5,12 +5,14 @@ from typing import TYPE_CHECKING, Any, override
|
|
5
5
|
from rich.theme import Theme
|
6
6
|
|
7
7
|
from bear_utils.logger_manager._common import FIVE_MEGABYTES
|
8
|
+
from bear_utils.logging.logger_manager._common import FIVE_MEGABYTES
|
8
9
|
|
9
10
|
from ._console_logger import ConsoleLogger
|
10
11
|
from ._sub_logger import SubConsoleLogger
|
11
12
|
|
12
13
|
if TYPE_CHECKING:
|
13
14
|
from bear_utils.logger_manager._styles import LoggerExtraInfo
|
15
|
+
from bear_utils.logging.logger_manager._styles import LoggerExtraInfo
|
14
16
|
|
15
17
|
|
16
18
|
class FileLogger(ConsoleLogger):
|
@@ -10,6 +10,7 @@ from typing import TYPE_CHECKING, Any, Generic, TypeVar
|
|
10
10
|
from rich.text import Text
|
11
11
|
|
12
12
|
from bear_utils.logger_manager._styles import LOGGER_METHODS, LoggerExtraInfo
|
13
|
+
from bear_utils.logging.logger_manager._styles import LOGGER_METHODS, LoggerExtraInfo
|
13
14
|
|
14
15
|
from ._level_sin import check_level
|
15
16
|
|
@@ -306,7 +306,7 @@ class HostMonitor:
|
|
306
306
|
if current_cpu_samples:
|
307
307
|
return round(sum(current_cpu_samples) / len(current_cpu_samples), 2)
|
308
308
|
except Exception as e:
|
309
|
-
|
309
|
+
self.console.error(f"Error getting CPU temperature: {e}", exc_info=True)
|
310
310
|
return 0.0
|
311
311
|
|
312
312
|
async def get_avg_mem_usage(self) -> float:
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bear-utils
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.1
|
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-email: chaz <bright.lid5647@fastmail.com>
|
6
6
|
Requires-Python: >=3.12
|
7
|
-
Requires-Dist: bear-epoch-time>=1.
|
7
|
+
Requires-Dist: bear-epoch-time>=1.1.1
|
8
8
|
Requires-Dist: diskcache<6.0.0,>=5.6.3
|
9
9
|
Requires-Dist: httpx>=0.28.1
|
10
10
|
Requires-Dist: pathspec>=0.12.1
|
@@ -20,7 +20,7 @@ Requires-Dist: tinydb>=4.8.2
|
|
20
20
|
Requires-Dist: toml>=0.10.2
|
21
21
|
Description-Content-Type: text/markdown
|
22
22
|
|
23
|
-
# Bear Utils v# Bear Utils v0.8.
|
23
|
+
# Bear Utils v# Bear Utils v0.8.1
|
24
24
|
|
25
25
|
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.
|
26
26
|
|
@@ -20,7 +20,7 @@ bear_utils/cli/shell/_common.py,sha256=_KQyL5lvqOfjonFIwlEOyp3K9G3TSOj19RhgVzfNN
|
|
20
20
|
bear_utils/config/__init__.py,sha256=HC_lWpmLF0kbPr5i1Wa2FLER2b446E_GecgU9EPmc04,353
|
21
21
|
bear_utils/config/config_manager.py,sha256=Xj0xOmY-wo_rwfcWiXyxNZWX9NknX_Jm9W56Gx8yyHQ,8244
|
22
22
|
bear_utils/config/dir_manager.py,sha256=slIy1oRr7VIPdsiwN66-xQiuSvgqm_j6d1IrKhxRsSk,2028
|
23
|
-
bear_utils/config/settings_manager.py,sha256=
|
23
|
+
bear_utils/config/settings_manager.py,sha256=6YaCSHYA0k6VPaLSrXJ_yjZ-lOPklMgQC73K20Z8yis,5181
|
24
24
|
bear_utils/constants/__init__.py,sha256=fE3p01HDJDV9uAMWYB8q8h7K01ekSqZPxymvgbNaN7Y,563
|
25
25
|
bear_utils/constants/_exceptions.py,sha256=gnAGTmuD9NYpJakeLrYHAyPrAQPHDNahY_rS42Ct39k,251
|
26
26
|
bear_utils/constants/_lazy_typing.py,sha256=WfuWpRqx9XchvuyPWg3tVjMC5-C4QA-Bhwfskf4YmAE,339
|
@@ -70,16 +70,16 @@ bear_utils/logger_manager/loggers/_base_logger.py,sha256=64ZzAKjuk4sZG_sUnXPSMjk
|
|
70
70
|
bear_utils/logger_manager/loggers/_base_logger.pyi,sha256=bo_Pykv42XvfBsQ7AmP_e_TEZ7puT_DhLqtqhEWBsc8,2667
|
71
71
|
bear_utils/logger_manager/loggers/_buffer_logger.py,sha256=JEd2afChzAKkM1va-L8xVOi1cF9n9W1vGzkI49YEf40,1527
|
72
72
|
bear_utils/logger_manager/loggers/_console_logger.py,sha256=bzyTA-DkeokGngl7AIg5zIvLwQUaWTk4NKtlH7P9SW8,9866
|
73
|
-
bear_utils/logger_manager/loggers/_console_logger.pyi,sha256=
|
74
|
-
bear_utils/logger_manager/loggers/_file_logger.py,sha256=
|
73
|
+
bear_utils/logger_manager/loggers/_console_logger.pyi,sha256=GHQONxyDi5l3VXEYk6dE3JguUJvKXisHQaICirfWp3M,1959
|
74
|
+
bear_utils/logger_manager/loggers/_file_logger.py,sha256=1EGgATidGuWi4_W_cBFEgZBGvYauV0z_xPFUM-yHqrc,4887
|
75
75
|
bear_utils/logger_manager/loggers/_level_sin.py,sha256=HxAhuQSBhJHygTB8hcAIYLoPl6u0pUbF1BZ2aLFmEHI,1747
|
76
76
|
bear_utils/logger_manager/loggers/_logger.py,sha256=FA0ALmROX1BQIal7zhEemLnC0UnXTQY-YqJBlPEbQDM,537
|
77
|
-
bear_utils/logger_manager/loggers/_sub_logger.py,sha256=
|
77
|
+
bear_utils/logger_manager/loggers/_sub_logger.py,sha256=t7l8cQIyrNgJi9PE0XMYhhb2wsy6VoHvsyvIkWuwwWM,3506
|
78
78
|
bear_utils/logger_manager/loggers/_sub_logger.pyi,sha256=rRcmrVFg7dhHO_tNQQXrpF3h4r0CdVyGxC4xtOIemzM,1002
|
79
79
|
bear_utils/monitoring/__init__.py,sha256=9DKNIWTp_voLnaWgiP-wJ-o_N0hYixo-MzjUmg8RUvI,240
|
80
80
|
bear_utils/monitoring/_common.py,sha256=LYQFxgTP9fk0cH71IQTuGwBYYPWCqHP_mMRNecoD76M,657
|
81
|
-
bear_utils/monitoring/host_monitor.py,sha256=
|
81
|
+
bear_utils/monitoring/host_monitor.py,sha256=e0TYRJw9iDj5Ga6y3ck1TBFEeH42Cax5mQYaNU8yams,13241
|
82
82
|
bear_utils/time/__init__.py,sha256=d9Ovv-Dlx5NWgnOl1hY-evznVm9hboS6ypNp1wDFxQQ,934
|
83
|
-
bear_utils-0.8.
|
84
|
-
bear_utils-0.8.
|
85
|
-
bear_utils-0.8.
|
83
|
+
bear_utils-0.8.1.dist-info/METADATA,sha256=YpR8pGkBiFFeVIiYpnqIKhqOJpsch9-_djhd2S-VDj4,8627
|
84
|
+
bear_utils-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
85
|
+
bear_utils-0.8.1.dist-info/RECORD,,
|
File without changes
|