Skip to main content

Terminal output styling - ANSI colors and styles for Python

Project description

Simple Python class with ANSI escape codes for styling and coloring terminal output


Installation

Just copy pytermcolors.py into your project folder


Example

from pytermcolors import colorize, Color

print(colorize("Hello World!", fg=Color.FG_CYAN, bg=Color.BG_WHITE, bold=True, italic=True))
print(colorize("Warning!", fg=Color.FG_YELLOW, bold=True, underline=True))
print(colorize("Error!", fg=Color.FG_RED, strike=True))

example

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

pytermcolors-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytermcolors-1.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pytermcolors-1.0.0.tar.gz.

File metadata

  • Download URL: pytermcolors-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pytermcolors-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9573061f6efb46ff33639ce06bb50fbafb6b969daa0a9e03711e2c379a293daf
MD5 9d69ebe7be1ac7df6281ce25abd0043a
BLAKE2b-256 aac7f904db36424b2ff1a780df064e8594a23bf242e7476ef137769d000982e5

See more details on using hashes here.

File details

Details for the file pytermcolors-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pytermcolors-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pytermcolors-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78d137011b36a8796feb125c8e734583ab848e36aabd89dd9fe4570c81081107
MD5 b0521a1ad2a916187626366d5efe5479
BLAKE2b-256 8177c5227967d58bd92d7998333ffcfcd903401559d3d819a1dca37eed3bc0c8

See more details on using hashes here.

Supported by

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