Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

print-color

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

print-color

A simple package to print in color to the terminal

  • 0.4.6
  • PyPI
  • Socket score

Maintainers
1

print-color

test

Print Color is a minimalist approach to terminal color printing in Python. It is a wrapper around the print() function, and simply allows you to provide extra optional parameters such as:

  • tag
  • tag_color or tag_colour
  • color or colour
  • background
  • format

It aims to be a customizable logger for your applications, and makes formatting warnings, info messages and errors a breeze.


Information

This project has no dependencies, apart from pytest for testing.

Check out this project on PyPi here.

Colors:

purple
blue
green
yellow
red
magenta
cyan
white
black

Parameter values:

  • tag
    • any string
  • tag_color or tag_colour
    • color
  • color or colour
    • color
  • background
    • color
  • format
    • bold
    • underline
    • blink

Installing

pip3 install print-color

Requirements

  • python 3.7^

Usage

from print_color import print

print("Hello world", tag='success', tag_color='green', color='white')

Success tag

print("Error detected", tag='failure', tag_color='red', color='magenta')

Error tag

print("Printing in color", color='green', format='underline', background='grey')

Printing in color is easy

Contributing

Feel free to add or improve this project :) Just create a pull request and explain the changes you propose. Note that as this is a very simple project, feature requests should be kept minimal - things like more colors, formats etc would be ideal.

Credits

Built with Python Poetry.

Contributors

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc