libdev 0.80__tar.gz → 0.82__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.
- {libdev-0.80 → libdev-0.82}/PKG-INFO +7 -5
- {libdev-0.80 → libdev-0.82}/README.md +1 -0
- {libdev-0.80 → libdev-0.82}/libdev/__init__.py +1 -1
- libdev-0.82/libdev/log.py +55 -0
- {libdev-0.80 → libdev-0.82}/libdev/req.py +1 -1
- {libdev-0.80 → libdev-0.82}/libdev.egg-info/PKG-INFO +7 -5
- {libdev-0.80 → libdev-0.82}/libdev.egg-info/SOURCES.txt +2 -0
- libdev-0.82/libdev.egg-info/requires.txt +5 -0
- {libdev-0.80 → libdev-0.82}/setup.py +7 -5
- {libdev-0.80 → libdev-0.82}/tests/test_doc.py +2 -0
- libdev-0.82/tests/test_log.py +5 -0
- libdev-0.80/libdev.egg-info/requires.txt +0 -4
- {libdev-0.80 → libdev-0.82}/LICENSE +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/cfg.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/check.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/codes.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/dev.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/doc.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/fin.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/gen.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/img.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/lang.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/num.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/s3.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev/time.py +0 -0
- {libdev-0.80 → libdev-0.82}/libdev.egg-info/dependency_links.txt +0 -0
- {libdev-0.80 → libdev-0.82}/libdev.egg-info/top_level.txt +0 -0
- {libdev-0.80 → libdev-0.82}/setup.cfg +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_cfg.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_check.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_codes.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_dev.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_gen.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_img.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_lang.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_num.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_req.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_s3.py +0 -0
- {libdev-0.80 → libdev-0.82}/tests/test_time.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libdev
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.82
|
|
4
4
|
Summary: Set of standard functions for development
|
|
5
5
|
Home-page: https://github.com/kosyachniy/lib
|
|
6
|
-
Author:
|
|
6
|
+
Author: Alex Poloz
|
|
7
7
|
Author-email: alexypoloz@gmail.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Project-URL: Source, https://github.com/kosyachniy/lib
|
|
@@ -19,9 +19,10 @@ Requires-Python: >=3.7, <4
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: aiohttp
|
|
22
|
-
Requires-Dist: python-dotenv
|
|
23
|
-
Requires-Dist: boto3
|
|
24
|
-
Requires-Dist: Pillow
|
|
22
|
+
Requires-Dist: python-dotenv
|
|
23
|
+
Requires-Dist: boto3
|
|
24
|
+
Requires-Dist: Pillow
|
|
25
|
+
Requires-Dist: loguru
|
|
25
26
|
|
|
26
27
|
# LibDev
|
|
27
28
|
Development library — Set of standard functions for development
|
|
@@ -34,6 +35,7 @@ Stream | Submodule | Description
|
|
|
34
35
|
---|---|---
|
|
35
36
|
System | ` libdev.cfg ` | Configuration getting
|
|
36
37
|
| ` libdev.req ` | AsyncIO requests (AIOHTTP wrapper)
|
|
38
|
+
| ` libdev.log ` | Logger (Loguru wrapper)
|
|
37
39
|
Data Format | ` libdev.num ` | Numeric conversions & handlers
|
|
38
40
|
| ` libdev.time ` | Time processing
|
|
39
41
|
Transforms | ` libdev.gen ` | Code & token generators
|
|
@@ -9,6 +9,7 @@ Stream | Submodule | Description
|
|
|
9
9
|
---|---|---
|
|
10
10
|
System | ` libdev.cfg ` | Configuration getting
|
|
11
11
|
| ` libdev.req ` | AsyncIO requests (AIOHTTP wrapper)
|
|
12
|
+
| ` libdev.log ` | Logger (Loguru wrapper)
|
|
12
13
|
Data Format | ` libdev.num ` | Numeric conversions & handlers
|
|
13
14
|
| ` libdev.time ` | Time processing
|
|
14
15
|
Transforms | ` libdev.gen ` | Code & token generators
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Custom logger module
|
|
3
|
+
--------------------
|
|
4
|
+
|
|
5
|
+
Provides an extension to the Loguru logger with a custom methods
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
from libdev.log import log
|
|
9
|
+
log.json({"event": "startup", "status": "success"})
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import sys
|
|
13
|
+
import atexit as _atexit
|
|
14
|
+
|
|
15
|
+
from loguru import _defaults
|
|
16
|
+
from loguru._logger import (
|
|
17
|
+
Core as _Core,
|
|
18
|
+
Logger as _Logger,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
from .doc import to_json
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Logger(_Logger):
|
|
25
|
+
"""
|
|
26
|
+
Extends the Loguru logger to include a method for logging JSON formatted messages
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def json(self, data):
|
|
30
|
+
"""Log a message in JSON format"""
|
|
31
|
+
self.info(to_json(data))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
log = Logger(
|
|
35
|
+
core=_Core(),
|
|
36
|
+
exception=None,
|
|
37
|
+
depth=0,
|
|
38
|
+
record=False,
|
|
39
|
+
lazy=False,
|
|
40
|
+
colors=False,
|
|
41
|
+
raw=False,
|
|
42
|
+
capture=True,
|
|
43
|
+
patchers=[],
|
|
44
|
+
extra={},
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
if _defaults.LOGURU_AUTOINIT and sys.stderr:
|
|
48
|
+
log.add(sys.stderr)
|
|
49
|
+
_atexit.register(log.remove)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = (
|
|
53
|
+
"log",
|
|
54
|
+
"Logger",
|
|
55
|
+
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libdev
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.82
|
|
4
4
|
Summary: Set of standard functions for development
|
|
5
5
|
Home-page: https://github.com/kosyachniy/lib
|
|
6
|
-
Author:
|
|
6
|
+
Author: Alex Poloz
|
|
7
7
|
Author-email: alexypoloz@gmail.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Project-URL: Source, https://github.com/kosyachniy/lib
|
|
@@ -19,9 +19,10 @@ Requires-Python: >=3.7, <4
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: aiohttp
|
|
22
|
-
Requires-Dist: python-dotenv
|
|
23
|
-
Requires-Dist: boto3
|
|
24
|
-
Requires-Dist: Pillow
|
|
22
|
+
Requires-Dist: python-dotenv
|
|
23
|
+
Requires-Dist: boto3
|
|
24
|
+
Requires-Dist: Pillow
|
|
25
|
+
Requires-Dist: loguru
|
|
25
26
|
|
|
26
27
|
# LibDev
|
|
27
28
|
Development library — Set of standard functions for development
|
|
@@ -34,6 +35,7 @@ Stream | Submodule | Description
|
|
|
34
35
|
---|---|---
|
|
35
36
|
System | ` libdev.cfg ` | Configuration getting
|
|
36
37
|
| ` libdev.req ` | AsyncIO requests (AIOHTTP wrapper)
|
|
38
|
+
| ` libdev.log ` | Logger (Loguru wrapper)
|
|
37
39
|
Data Format | ` libdev.num ` | Numeric conversions & handlers
|
|
38
40
|
| ` libdev.time ` | Time processing
|
|
39
41
|
Transforms | ` libdev.gen ` | Code & token generators
|
|
@@ -11,6 +11,7 @@ libdev/fin.py
|
|
|
11
11
|
libdev/gen.py
|
|
12
12
|
libdev/img.py
|
|
13
13
|
libdev/lang.py
|
|
14
|
+
libdev/log.py
|
|
14
15
|
libdev/num.py
|
|
15
16
|
libdev/req.py
|
|
16
17
|
libdev/s3.py
|
|
@@ -28,6 +29,7 @@ tests/test_doc.py
|
|
|
28
29
|
tests/test_gen.py
|
|
29
30
|
tests/test_img.py
|
|
30
31
|
tests/test_lang.py
|
|
32
|
+
tests/test_log.py
|
|
31
33
|
tests/test_num.py
|
|
32
34
|
tests/test_req.py
|
|
33
35
|
tests/test_s3.py
|
|
@@ -31,7 +31,7 @@ setup(
|
|
|
31
31
|
long_description=long_description,
|
|
32
32
|
long_description_content_type="text/markdown",
|
|
33
33
|
url="https://github.com/kosyachniy/lib",
|
|
34
|
-
author="
|
|
34
|
+
author="Alex Poloz",
|
|
35
35
|
author_email="alexypoloz@gmail.com",
|
|
36
36
|
classifiers=[
|
|
37
37
|
"Development Status :: 4 - Beta",
|
|
@@ -50,10 +50,12 @@ setup(
|
|
|
50
50
|
packages=find_packages(exclude=("tests",)),
|
|
51
51
|
python_requires=">=3.7, <4",
|
|
52
52
|
install_requires=[
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
53
|
+
# NOTE: Without lib versions because of conflicts with main repo
|
|
54
|
+
"aiohttp",
|
|
55
|
+
"python-dotenv",
|
|
56
|
+
"boto3",
|
|
57
|
+
"Pillow",
|
|
58
|
+
"loguru",
|
|
57
59
|
],
|
|
58
60
|
project_urls={
|
|
59
61
|
"Source": "https://github.com/kosyachniy/lib",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|