Skip to main content

Elegant Console Logger For Python Command Line Apps

Project description

Signale.py

Elegant Console Logger For Python Command-Line Apps



example

Installation

Signale.py can be installed using pip.

    [sudo] pip install signalepy

Usage

Package consists of a class Signale, it is the main constructor class. The object created has all the logger functions in it.

Using Loggers

Each logger function takes in three arguments:-

  • text
  • prefix ( Optional )
  • suffix ( Optional )

They all are available in the logger object. To create one do this:-

    from signalepy import Signale

    logger = Signale()

Now you can use the default loggers using this object like:-

    ...

	logger.success("Started Successfully", prefix="Debugger")
	logger.warning("`a` function is deprecated", suffix="main.py")
	logger.complete("Run Complete")

    ...

This will produce the following result:-



View All Available Loggers
  • simple
  • success
  • error
  • warning
  • start
  • stop
  • watch
  • important
  • pending
  • complete
  • debug
  • pause
  • info
  • center

API

signalepy.<logger>(message="", prefix="", suffix="")


logger

  • Type: function

Can be any default logger


message

  • Type: str

Message to be displayed


prefix

  • Type: str
  • Required: False

Prefix text


suffix

  • Type: str
  • Required: False

Suffix text


Licensed Under MIT License A Project By Shardul Nalegave

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

signalepy-0.1.3.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

signalepy-0.1.3-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page