prismalog 0.1.0__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.
prismalog/py.typed ADDED
File without changes
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: prismalog
3
+ Version: 0.1.0
4
+ Summary: High-performance colored, multi-process logging library for Python
5
+ Author-email: Alexey Obukhov <alexey.obukhov@hotmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/vertok/prismalog
8
+ Project-URL: Documentation, https://prismalog.readthedocs.io/
9
+ Project-URL: Issues, https://github.com/vertok/prismalog/issues
10
+ Project-URL: Changelog, https://github.com/vertok/prismalog/blob/main/CHANGELOG.md
11
+ Keywords: logging,colored,high-performance,multiprocessing
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: System :: Logging
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Provides-Extra: yaml
23
+ Requires-Dist: PyYAML>=6.0.1; extra == "yaml"
24
+ Provides-Extra: dev
25
+ Requires-Dist: black>=22.6.0; extra == "dev"
26
+ Requires-Dist: pylint>=2.14.0; extra == "dev"
27
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
28
+ Requires-Dist: isort>=5.10.0; extra == "dev"
29
+ Requires-Dist: build>=0.8.0; extra == "dev"
30
+ Requires-Dist: twine>=4.0.0; extra == "dev"
31
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
32
+ Requires-Dist: pre-commit>=3.5.0; extra == "dev"
33
+ Requires-Dist: PyYAML>=6.0.2; extra == "dev"
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=8.3.5; extra == "test"
36
+ Requires-Dist: pytest-cov>=3.0.0; extra == "test"
37
+ Requires-Dist: pytest-html>=3.2.0; extra == "test"
38
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "test"
39
+ Requires-Dist: coverage>=7.6.1; extra == "test"
40
+ Requires-Dist: nltk>=3.9.1; extra == "test"
41
+ Requires-Dist: PyYAML>=6.0.2; extra == "test"
42
+ Provides-Extra: doc
43
+ Requires-Dist: sphinx>=4.5.0; extra == "doc"
44
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "doc"
45
+ Requires-Dist: sphinx-autodoc-typehints>=1.18.0; extra == "doc"
46
+ Requires-Dist: sphinx-design>=0.5.0; extra == "doc"
47
+ Provides-Extra: ci
48
+ Requires-Dist: anybadge>=1.10.0; extra == "ci"
49
+ Provides-Extra: all
50
+ Requires-Dist: black>=22.6.0; extra == "all"
51
+ Requires-Dist: pylint>=2.14.0; extra == "all"
52
+ Requires-Dist: mypy>=1.0.0; extra == "all"
53
+ Requires-Dist: isort>=5.10.0; extra == "all"
54
+ Requires-Dist: build>=0.8.0; extra == "all"
55
+ Requires-Dist: twine>=4.0.0; extra == "all"
56
+ Requires-Dist: flake8>=5.0.0; extra == "all"
57
+ Requires-Dist: pre-commit>=3.5.0; extra == "all"
58
+ Requires-Dist: PyYAML>=6.0.2; extra == "all"
59
+ Requires-Dist: pytest>=8.3.5; extra == "all"
60
+ Requires-Dist: pytest-cov>=3.0.0; extra == "all"
61
+ Requires-Dist: pytest-html>=3.2.0; extra == "all"
62
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "all"
63
+ Requires-Dist: coverage>=7.6.1; extra == "all"
64
+ Requires-Dist: nltk>=3.9.1; extra == "all"
65
+ Requires-Dist: sphinx>=4.5.0; extra == "all"
66
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "all"
67
+ Requires-Dist: sphinx-autodoc-typehints>=1.18.0; extra == "all"
68
+ Requires-Dist: sphinx-design>=0.5.0; extra == "all"
69
+ Requires-Dist: anybadge>=1.10.0; extra == "all"
70
+ Dynamic: license-file
71
+
72
+ # prismalog
73
+
74
+ A robust, multi-process safe logging system for Python applications that integrates perfectly with the psy-supabase package.
75
+
76
+ [![PyPI version](https://img.shields.io/pypi/v/prismalog.svg)](https://pypi.org/project/prismalog/)
77
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/prismalog.svg)](https://pypi.org/project/prismalog/)
78
+ [![Coverage Python 3.8](https://vertok.github.io/prismalog/badges/coverage-py3.8.svg)](https://vertok.github.io/prismalog/htmlcov/index.html)
79
+ [![Pylint Python 3.8](https://vertok.github.io/prismalog/badges/pylint-py3.8.svg)](https://vertok.github.io/prismalog/reports/html/3.8/reports/pylint/pylint-py3.8.html)
80
+ [![Coverage Python 3.10](https://vertok.github.io/prismalog/badges/coverage-py3.10.svg)](https://vertok.github.io/prismalog/htmlcov/index.html)
81
+ [![Pylint Python 3.10](https://vertok.github.io/prismalog/badges/pylint-py3.10.svg)](https://vertok.github.io/prismalog/reports/html/3.10/reports/pylint/pylint-py3.10.html)
82
+ [![Coverage Python 3.11](https://vertok.github.io/prismalog/badges/coverage-py3.11.svg)](https://vertok.github.io/prismalog/htmlcov/index.html)
83
+ [![Pylint Python 3.11](https://vertok.github.io/prismalog/badges/pylint-py3.11.svg)](https://vertok.github.io/prismalog/reports/html/3.11/reports/pylint/pylint-py3.11.html)
84
+
85
+ ## Features
86
+
87
+ - โš›๏ธ Zero-dependency core
88
+ - ๐Ÿš€ High performance
89
+ - ๐ŸŽจ Colored console output
90
+ - ๐Ÿ“ Automatic log file rotation
91
+ - ๐Ÿ”„ Multi-process safe logging
92
+ - ๐Ÿงต Multithreading-safe logging
93
+ - โš™๏ธ YAML-based configuration
94
+ - ๐Ÿ”‡ Control for verbose third-party libraries
95
+ - ๐Ÿงช Testing support
96
+
97
+ ## Performance Characteristics
98
+
99
+ prismalog was designed for high-performance applications. My testing shows:
100
+
101
+ - **Overhead per log call**: ~0.15ms (typical)
102
+ - **Memory impact**: Minimal (~0.3MB for 10,000 messages)
103
+ - **Throughput**: Capable of handling 20,000+ messages per second
104
+ - **Multi-process/Multi-threading safety**: No measurable performance penalty compared to single-process
105
+
106
+ ## Performance Notes
107
+
108
+ While prismalog achieves excellent performance characteristics, it's important to note that the primary bottleneck is filesystem I/O when writing to log files. This limitation is inherent to disk-based logging systems:
109
+
110
+ - File locking mechanisms required for multi-process safety introduce some overhead
111
+ - Synchronous writes to ensure log integrity can impact throughput during high-volume logging events
112
+ - Storage device speed directly impacts maximum sustainable throughput
113
+
114
+ For applications with extreme logging requirements, consider:
115
+ - Using an asynchronous logging configuration
116
+ - Implementing log batching for high-volume events
117
+ - Configuring separate log files for different components to distribute I/O load
118
+
119
+ The current performance metrics were achieved with standard SSD hardware. With specialized I/O optimization or enterprise-grade storage systems, significantly higher throughput is achievable.
120
+
121
+ ## Quick Start
122
+
123
+ ```python
124
+ from prismalog import get_logger, LoggingConfig
125
+
126
+ # Initialize with configuration file
127
+ LoggingConfig.initialize(config_file="config.yaml")
128
+
129
+ # Get a logger
130
+ logger = get_logger("my_module")
131
+ logger.info("Application started")
132
+ ```
133
+
134
+ ## Command-Line Integration
135
+
136
+ Any application using prismalog automatically supports these command-line arguments:
137
+
138
+ ```bash
139
+ --log-config PATH # Path to logging configuration file
140
+ --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
141
+ # Set the default logging level
142
+ --log-dir PATH # Directory where log files will be stored
143
+ ```
144
+
145
+ ## Usage
146
+
147
+ ```python
148
+ from prismalog.log import get_logger, LoggingConfig
149
+
150
+ # Initialize logging (with command-line support)
151
+ LoggingConfig.initialize(use_cli_args=True)
152
+
153
+ # Get logger and use it
154
+ logger = get_logger("my_app")
155
+ logger.info("Application started")
156
+ ```
157
+
158
+ ## Dependencies
159
+
160
+ prismalog is designed to work with **zero external dependencies** for core functionality. It relies solely on the Python standard library, making it lightweight and easy to integrate into any project.
161
+
162
+ ### Optional Dependencies
163
+
164
+ - **YAML Configuration**: If YAML config files needed, install with `pip install prismalog[yaml]`
165
+ - **Development**: For running tests and examples, install with `pip install prismalog[dev]`
166
+
167
+ ### Installation Options
168
+
169
+ ```bash
170
+ # Prepare before installation (recommended)
171
+ python -m venv .venv
172
+ source source .venv/bin/activate
173
+
174
+ # Basic installation - no external dependencies
175
+ pip install -e .
176
+
177
+ # With documentation support
178
+ pip install prismalog[doc]
179
+
180
+ # For development and testing
181
+ pip install prismalog[dev]
182
+
183
+ # With all optional features
184
+ pip install prismalog[all]
@@ -0,0 +1,10 @@
1
+ prismalog/__init__.py,sha256=Hr3ZNOGJLb8YvDTxViYuNUOKTlKridjFVmubnoCk1c4,998
2
+ prismalog/argparser.py,sha256=M6WVCFvqtTKwxKZ89EtTKuo9jN0Egh785o0sj82WD_0,7105
3
+ prismalog/config.py,sha256=V5g5YjEZEqznJPUUQdWeeQgiU5R3gm21oONHRhv0gC4,29596
4
+ prismalog/log.py,sha256=b-zlMs2Y-KI7RuGO8KxFKFuAI0QMN6AiH6sM5vGZNE8,34573
5
+ prismalog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ prismalog-0.1.0.dist-info/licenses/LICENSE,sha256=A1PgraGM1LCUsPVtfZk1lOVRM1TrxvGqfleCPm0hKKk,1071
7
+ prismalog-0.1.0.dist-info/METADATA,sha256=FOOAHtX1MW4nDojHKB8-qxQtwx_a9c376FFzlpJ52v8,7725
8
+ prismalog-0.1.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
9
+ prismalog-0.1.0.dist-info/top_level.txt,sha256=k65xN7XJxN3Z3UOJTQpDUkQnmRDv763tkgVneLrEesU,10
10
+ prismalog-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alexey Obukhov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ prismalog