Structured drop-in extensions for Python's built-in exceptions and warnings. Formatted output, GDPR-safe production mode, hookable logging, zero boilerplate.
Project description
import ladon_clear_exceptions_n_warnings as ladon
class MiniLogger:
@classmethod
def warning(cls, multiline_string):
print("warn")
print(multiline_string)
@classmethod
def error(cls, multiline_string):
print("warn")
print(multiline_string)
def warn_hook(warn_object): print(warn_object) print("We hooked a warning...")
def exception_hook(exception_object, is_oop_exception): print(is_oop_exception) print(exception_object) print("We hooked a exception!")
ladon.ConfigManager.set_logger(MiniLogger)
ladon.ConfigManager.enable_log_warning() ladon.ConfigManager.enable_auto_log_exceptions()
ladon.ConfigManager.suppress_warning()
ladon.ConfigManager.set_exceptions_hook_function(exception_hook) ladon.ConfigManager.set_warnings_hook_function(warn_hook) ladon.ConfigManager.set_number_of_prior_warning_code_lines(5)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ladon_clear_exceptions_n_warnings-1.3.0.tar.gz.
File metadata
- Download URL: ladon_clear_exceptions_n_warnings-1.3.0.tar.gz
- Upload date:
- Size: 297.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3effda4581983b0227b692c5b599cb4ffdef83871f22c354121004dd0ee53b7e
|
|
| MD5 |
977a6de147d7660b32c5d76d08d4d6a2
|
|
| BLAKE2b-256 |
1ba4ec12e408a34456ca7a6d4bd863569e798049db1c85c0d17580a7e8f21cf3
|
File details
Details for the file ladon_clear_exceptions_n_warnings-1.3.0-py3-none-any.whl.
File metadata
- Download URL: ladon_clear_exceptions_n_warnings-1.3.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d973b66bd775e4d30ea0eb0b192009fb0b59f52499e58e045aa62e03a626229e
|
|
| MD5 |
aaa6b24502d8cea458b304e20c447b3b
|
|
| BLAKE2b-256 |
e2b20ae19c9ce14446c9431c1cf9b9d4d689b454feab528df2fecea93774f4dc
|