Metadata-Version: 2.1
Name: python-error
Version: 1.0.7
Summary: Error Handling and Logging Toolkit for Python
Home-page: https://github.com/pb2204/py-error-handling-toolkit
Author: PB2204 (Pabitra Banerjee)
Author-email: <rockstarpabitra2204@gmail.com>
Keywords: python,error,log,error handling,debugging
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: requests


**`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 `CustomError` class.

- Flexible error logging with customizable log formats.

- Example usage and unit tests included.



## Installation



You can install the toolkit using pip:



```bash

pip install py-error-handling-toolkit

```



## Usage



Here's how you can use the toolkit in your Python code:



```python

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](https://github.com/yourusername/py-error-handling-toolkit).



## Contributing



Contributions are welcome! Please check out the [contribution guidelines](CONTRIBUTING.md) for details on how to contribute to this project.



## License



This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

