Utility to make your terminal apps stand out.
Project description
🌸🎨 Bloom 🎨🌸
Make your terminal output beautiful with simple, intuitive styling functions.
✨ Features
- 🎯 Simple API for common terminal styling needs
- 🌈 16 Foreground & Background colors
- 💫 Text effects (bold, italic, underline, inverse)
- 📏 Centered titles with custom borders
- 🔤 Styled input prompts
- 💻 Windows support via Colorama
📦 Installation
pip install bloom-tui
🚀 Quick Start
from bloom import title, pinput, selector
from bloom.styles import fg, bg, style
# Create beautiful titles
title(text="Welcome to Bloom!", borderchar="=", borderlen=6) # ====== Welcome to Bloom! ======
# Styled input prompts (spaces at the end included)
name = pinput("What's your name?", customprefix="→")
# What's your name?
# →
# Easy selection menus
mySelector = selector.Selector("How are you feeling?", ["good", "bad", "normal"])
mySelector.invoke()
"""
How are you feeling?
> good
- bad
- normal
"""
# Colorful output
print(f"{fg.GREEN}{style.BOLD}Success!{style.RESET}")
print(f"{bg.BLUE}{fg.WHITE}Info message{style.RESET}")
🎨 Available Styles
Colors (fg/bg)
Standard: BLACK
RED
GREEN
YELLOW
BLUE
MAGENTA
CYAN
WHITE
Bright: BBLACK
BRED
BGREEN
BYELLOW
BBLUE
BMAGENTA
BCYAN
BWHITE
Text Effects
BOLD
-- Bold textITALIC
-- Italic textUNDERLINE
-- Underlined textINVERTED
-- The foreground and background colours are invertedRESET
-- Reset all styles, leave it like default
[!TIP] Use
style.RESET
at the end of each print to prevent bleeding the style to the next lines
🛠️ Development
# Clone the repository
git clone https://github.com/piker98988/bloom-tui.git
cd bloom-tui
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
💡 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
📄 License
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.
Copyright (C) 2024 Piker
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
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
Built Distribution
File details
Details for the file bloom_tui-0.2.0.tar.gz
.
File metadata
- Download URL: bloom_tui-0.2.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e449929eab279781c92536e22d641f326999b0d935b7e3e7a555046b4c4d928b |
|
MD5 | ac0f41e61e8b455aa9353a068120b926 |
|
BLAKE2b-256 | 02b7adc8e5af9fa4c81281d79877f883fb9474399086c694421ea4a7d29de86f |
File details
Details for the file bloom_tui-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: bloom_tui-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14f57dc59084683be92ab19f1e6a0b8c0fee7f560c63afff3814b1bd8b3ae3d3 |
|
MD5 | 1485551f0b8fa29131747dc047280588 |
|
BLAKE2b-256 | 8996c5a2eafb55ac4b87c64f0dfaf33092b4df97ee25cfcf5fe54066017a5eae |