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
Release history Release notifications | RSS feed
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 hashes)