Logging library for the impatient
Project description
Notiblocks
Quick and easy customizable terminal logs for your application.
Table of Contents
Introduction
Welcome to Notiblocks, a versatile Python library designed to enhance terminal logging with customizable and intuitive features.
What is Notiblocks?
Notiblocks is more than just a logging library; it's a powerful tool that simplifies and elevates your terminal logging experience. It offers a user-friendly interface for creating custom, eye-catching logs, allowing developers to seamlessly integrate informative and visually appealing messages into their applications.
Why Notiblocks?
-
Simplicity: With Notiblocks, logging becomes effortless. Its intuitive design makes it easy to craft customized terminal logs without complex configurations.
-
Customization: Tailor your logs to suit your application's needs. Notiblocks offers a wide range of styling options, allowing you to create logs that stand out.
-
Versatility: Whether you're working on a small script or a large-scale project, Notiblocks scales to meet your logging requirements.
Features
- Customizable log styles and colors
- Easy integration into existing projects
- Make your own logging templates and reuse them whenever you want to
- Inline formatting, so you could add anything you want in the logs
- Low resource usage
Installation
Install notiblocks trough pip
pip install notiblocks
And just import the module into your application
import notiblocks
Usage
Notiblocks uses NBConfig
and NBHandler
objects, which let you customize your logs by your needs. You can access them trough the module.
NBConfig
: Holds the information about how your logs will look. You can override the information trough the constructor, or through the setters. For further explanation check thedocs
.- NBHandler: Wrapper class for the
NBConfig
, which provides the main functionalities assuccess
,fail
,warn
andlog
. For further information check thedocs
.
Example:
from notiblocks import NBConfig, NBHandler
nb_conf = NBConfig(
success_sign_color="blue",
time_sign_color="GrEEn",
success_sign="SUCCESS",
success_bracket_color="cyan",
time_sign_stamp="DATE",
bracket_style="round ",
warn_bracket_sign="square"
)
nb_handler = NBHandler(nb_conf)
print(nb_handler.success("Notiblocks is cool."))
print(nb_handler.fail("Notiblocks is still not in a finished state..."))
print(nb_handler.warn("You haven't smiled enough today :)"))
print(nb_handler.log("User {} accessed this page", page.user))
Contributing
We welcome contributions from the community to help improve Notiblocks. If you'd like to contribute, please follow these guidelines:
- Fork the repository and clone it to your local machine.
- Create a new branch for your feature or bug fix:
git checkout -b feature/my-feature or git checkout -b bugfix/issue-123
. - Make your changes and test thoroughly.
- Commit your changes with descriptive commit messages:
git commit -m "Brief description of your changes"
. - Push to your branch: git push origin feature/my-feature.
- Open a pull request to the main branch and provide a detailed description of your changes.
- We appreciate your contributions, whether they're bug fixes, documentation improvements, or new features!
License
Notiblocks is licensed under the MIT License, check LICENSE
for more information.
Join us on the journey to transform your terminal logging experience with Notiblocks!
Project details
Release history Release notifications | RSS feed
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
Hashes for notiblocks-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1bb49a7b2f739534519e07abe67ed8e0399633b25074e2b062d90df412d7d46 |
|
MD5 | d0515b6c532a269e65268ac4d5fca72f |
|
BLAKE2b-256 | 62b5d5710b78dacc9dcc7eedca3be0a92a990505e91c0043138c590f44380a14 |