A Python Library For All Python Pet Peeves
Project description
pypeeve
PyPeeve is a python library for python pet peeves! As a developer, you know how time-consuming and tedious it can be to write the same boilerplate code over and over again. The aim of this library is to provide a tool that helps developers to reduce their unnecessary effort in writing boilerplate codes repeatedly in every project, allowing you to focus on what really matters - solving problems and building new features.
Installation
To install the latest version, run-
pip install pypeeve
What PyPeeve Offers
There are the list of things pypeeve offers so far:
Logger
Pypeeve provides a set of pre-configured loggers. The simplest and quickest way to use pypeeve logger and logger decorators is to import a pre-configured logger that suit your need.
from pypeeve.logger import logger
@logger.default
@logger.perf
def do_something():
logger.info("Info logs")
logger.error("Error logs")
Output-
[2023-03-27 02:28:47,680] - [DEBUG] - Entering do_something()
[2023-03-27 02:28:47,681] - [INFO] - Info logs
[2023-03-27 02:28:47,681] - [ERROR] - Error logs
[2023-03-27 02:28:47,682] - [DEBUG] - do_something() starting time: 91411.408944
[2023-03-27 02:28:47,682] - [DEBUG] - do_something() ending time: 91411.409873
[2023-03-27 02:28:47,683] - [INFO] - Total time taken to finish do_something(): 0.000929 second(s)
[2023-03-27 02:28:47,684] - [DEBUG] - Exiting do_something()
The detailed documentation about the pypeeve loggers can be found in logger readme.
License
Pypeeve is distributed under MIT License. License details of all the third party tools used in pypeeve can be found in Third Party Licenses.
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.