README.md
Error Handling and Logging Toolkit for Python
A Python toolkit that provides enhanced error handling and logging capabilities, making it easier to identify and debug runtime errors when they occur.
Features
-
Custom error handling with
CustomErrorclass. -
Flexible error logging with customizable log formats.
-
Example usage and unit tests included.
Installation
You can install the toolkit using pip:
pip install py-error-handling-toolkit
Usage
Here's how you can use the toolkit in your Python code:
from toolkit.error_handler import CustomError, handle_error
from toolkit.logger import setup_logger
# Initialize the logger
logger = setup_logger('error.log')
try:
# Code that may raise exceptions
raise CustomError("This is a custom error.")
except CustomError as ce:
handle_error(ce, log_function=logger.error)
except Exception as e:
handle_error(e, log_function=logger.error)
else:
logger.info("No errors occurred.")
For more detailed usage instructions, see the full documentation.
Contributing
Contributions are welcome! Please check out the contribution guidelines for details on how to contribute to this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for python-error 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-error-1.0.7.tar.gz | 2.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_error-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.2 kB
Release files / python-error-1.0.7.tar.gz
| Download URL | python-error-1.0.7.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adb0864a8dba8756f68a54a9119406cc17ca334fbdff380d8bd06fe4bde258b8
|
|
BLAKE2b-256 checksum How to use checksums |
f6544c9d8afb6af4a2a0c6c9277360dadef676c13efe2c6f1400cd165ff52f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / python_error-1.0.7-py3-none-any.whl
| Download URL | python_error-1.0.7-py3-none-any.whl |
|---|---|
| Size | 1.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18d80a775dbc8716ce533acdebde0a38c652f2fa34083adf95552442e32c3d61
|
|
BLAKE2b-256 checksum How to use checksums |
dae354a717583df375498aa1d6651ea797c268124037d117deff696e86da88ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for python-error 1.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.