Skip to main content

Luminance is a library for working with user output and console input

Project description

luminance

LuminanceCLI is a versatile Python library designed to enhance console interactions across a wide range of Python language versions.

Installation

  • Stable version:
git clone https://github.com/reslaid/luminance.git
  • Unreleased version:
git clone -b dev https://github.com/reslaid/luminance.git

Usage

from luminance import AnsiConsole

# Create an instance of AnsiConsole
console = AnsiConsole()

# Styling text
console.printf(
    "Hello, AnsiConsole!",
    style=[
        console.Styles.BOLD,
        console.Styles.UNDERLINE,
        console.Colors.Fore.GREEN,
        console.Colors.Back.WHITE
    ]
)

# Gradient printing
console.grd_printf(
    "Gradient Text",
    color1="#FF0000",
    color2="#00FF00"
)

# Get user input with styled prompt
user_input = console.inputf(
    "Enter something:",
    style=[
        console.Styles.BOLD,
        console.Colors.Fore.CYAN
    ]
)

# Get password input with styled prompt
password = console.passf(
    "Enter password:",
    style=[
        console.Styles.BOLD,
        console.Colors.Fore.YELLOW
    ]
)

# Clear the console
console.clearf()

# Set console title
console.titlef("My Console App")

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

luminance-0.1.4.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file luminance-0.1.4.tar.gz.

File metadata

  • Download URL: luminance-0.1.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for luminance-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d4a95ae6c4ce19201f108cbbd19616176614297977c70b77795e5c0d64e05f08
MD5 cdf1e21959546d9c9cfe5ab1f651ab9d
BLAKE2b-256 2ed5c6656c87e2ce48c2397923d25c5b57ee5d1b211863fe7cb9ed35bf1fe16d

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