Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://travis-ci.org/fgimian/painter.png?branch=v0.2 :target: https://travis-ci.org/fgimian/painter :alt: Build Status .. image:: https://coveralls.io/repos/fgimian/painter/badge.png?branch=master :target: https://coveralls.io/r/fgimian/painter?branch=master :alt: Coverage Status .. image:: https://pypip.in/license/painter/badge.png :target: https://pypi.python.org/pypi/painter/ :alt: License .. image:: https://pypip.in/version/painter/badge.png :target: https://pypi.python.org/pypi/painter/ :alt: Latest Version .. image:: https://pypip.in/download/painter/badge.png :target: https://pypi.python.org/pypi/painter/ :alt: Downloads
.. |logo| image:: https://raw.githubusercontent.com/fgimian/painter/master/images/painter_logo.png :alt: Painter Logo
|logo|
Painter is an ANSI coloring library based on the excellent
chalk <https://github.com/sindresorhus/chalk>
_ and
colors.js <https://github.com/marak/colors.js/>
_
libraries for Node.js. However, painter attempts to provide an even more
expressive API which reads like English.
Painter is fully tested with 100% coverage and also completely Flake8 compliant too!
Quick Start
Install Painter in your virtualenv as follows:
.. code:: bash
pip install painter
And now, go ahead and use it to output colors to your terminal:
.. code:: python
from __future__ import print_function
from painter import paint
# Simple printing of colors
print('Welcome to Painter!', paint.red('I can paint things red'),
paint.blue('and blue'))
# Chaining colors and styles
print(paint.blue.on_red.bold.underline('and far more complex combos too'))
print()
# Using color patterns
print(paint.rainbow('Awww look, a pretty rainbow :)'))
print(paint.zebra('and a scary looking zebra!'))
print()
# Nested painting
print(paint.on_red('I can also use a background color across',
paint.blue('multiple'),
paint.yellow('foreground colors')))
# Custom separator
print(paint('and', 'allow', 'you to use', paint.red('custom separators'),
sep='-'))
print()
# Creating themes
cool_theme = paint.green.on_red.underline.bold
print('Creating', cool_theme('your own theme'), 'is easy')
# Easily disable painting of colors
paint.enabled = False
print('and I allow you to easily', paint.red('disable'), paint.blue('me'))
print()
paint.enabled = True
print('Hope you have a', paint.blue('lovely day!'), paint.green(':)'))
The output of this script looks something like this:
.. image:: https://raw.githubusercontent.com/fgimian/painter/master/images/painter_demo.png
:alt: Painter Demo
Documentation
For full details on using Painter, please check out the
Painter GitHub Page <https://github.com/fgimian/painter>
_.
FAQs
Your own expressive painter who colors text in your terminal.
We found that painter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.