Skip to main content

A simple package that enables coloured output in Python console applications.

Project description

Hueprint

Summary

Hueprint is a simple package that allows the usage of colour and text effects in Python console applications.

Data Types

The package introduces two simple enums: EColour and EEffect.

Functions

  • cprint: allows using EColour and EEffect for easy text style customization.
  • sprint: "success" style; green, no effect.
  • eprint: "error" style; red, no effect.
  • wprint: "warning" style; yellow, no effect.
  • nprint: "notification" style; blue, no effect.
  • iprint: a wrapper to the pprint function (from the pprint package).

Example

cprint is the only function that differs from print in terms of number or arguments required, so this example will focus on that:

    from hueprint import cprint
    from hueprint.types import EColour, EEffect

    text = "Hello, World!"
    colour = EColour.CYAN
    effect = EEffect.ITALIC

    cprint(text, colour, effect)  # This will print the specified text in cyan and italic.

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

hueprint-1.0.1.tar.gz (4.2 kB view hashes)

Uploaded Source

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