Skip to main content

Pastel: Bring colors to your terminal

Pastel is a simple library to help you colorize strings in your terminal.

It comes bundled with predefined styles:

  • info: green

  • comment: yellow

  • question: black on cyan

  • error: white on red

https://raw.githubusercontent.com/sdispater/pastel/master/assets/screenshot.png

Features

  • Use predefined styles or add you own.

  • Disable colors all together by calling with_colors(False).

  • Automatically disables colors if the output is not a TTY.

  • Used in cleo.

  • Supports Python 2.7+, 3.5+ and PyPy.

Usage

>>> import pastel
>>> print(pastel.colorize('<info>Information</info>'))
'Information'  # Green string by default
>>> print(pastel.colorize('<fg=red;options=bold>This is bold red</>'))
'This is bold red'

Installation

pip install pastel

Metadata

Release files for pastel 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pastel 0.2.1
File Size Uploaded Provenance Actions
pastel-0.2.1.tar.gz 7.6 kB Without provenance Details for pastel-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pastel 0.2.1
File Interpreter ABI Platform Actions
pastel-0.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for pastel-0.2.1-py2.py3-none-any.whl

Total release size: 13.5 kB

Release files / pastel-0.2.1.tar.gz

Download URL pastel-0.2.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d
BLAKE2b-256 checksum
How to use checksums
76f14594f5e0fcddb6953e5b8fe00da8c317b8b41b547e2b3ae2da7512943c62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.0b2 CPython/3.8.5 Darwin/20.1.0

Release files / pastel-0.2.1-py2.py3-none-any.whl

Download URL pastel-0.2.1-py2.py3-none-any.whl
Size 6.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364
BLAKE2b-256 checksum
How to use checksums
aa18a8444036c6dd65ba3624c63b734d3ba95ba63ace513078e1580590075d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.0b2 CPython/3.8.5 Darwin/20.1.0

Security for pastel 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page