PyStyle is a python library to make very beautiful TUI designs.
Inspired by pyfade and pycenter,
Developped by Billy, loTus01, and BlueRed
pip3 install pystyleStats: https://pepy.tech/project/pystyle
- Colorate text ✔️
- Colorate text with fade effect ✔️
- Animations ❌
- Writing effects ✔️
- Centered Text ✔️
- Adding banners ✔️
- Make boxes ✔️
- Hide and Show Cursor ✔️
- System Functions ✔️
Colorate some text easily.
from pystyle import Colors, Colorate
text = "Hello world!"
print(Colors.blue + text)
# or
print(Colorate.Color(Colors.blue, text, True))Colors.blue = color
text = text to be colored
True = end the coloring after (otherwise it will continue printing characters in the specified color)
Available functions are:
- Color (simply colorate a text)
- Error (make an error effect easily)
Make a fade effect.
from pystyle import Colors, Colorate
print(Colorate.Horizontal(Colors.yellow_to_red, "Hello, Welcome to Pystyle.", 1))Colors.yellow_to_red = color
Colorate.Vertical = mode
1 = intensity (default=1)
Available effects are:
- Vertical
- Horizontal
- Diagonal
- DiagonalBackwards
To print a text with a writing and fade effect you can use the pystyle.Write function.
from pystyle import Write, Colors
name = Write.Input("Enter your name -> ", Colors.red_to_purple, interval=0.0025)
Write.Print(f"Nice to meet you, {name}!", Colors.blue_to_green, interval=0.05)There are 2 functions:
Write.Print: prints the text to the terminal with chosen effects
Write.Input: same than Write.Print but adds an input at the end
There are 6 arguments:
text: the text to be written to the terminal
color: the color you want for the text
interval: the interval of the writing effect
hide_cursor: whether you want the cursor to be hidden or not
end: the end color, the default is white
input_color (only for Write.Input): the color of the input
Center a text in the terminal.
from pystyle import Center
print(Center.XCenter("Hello, Welcome to Pystyle."))Output:
Hello, Welcome to Pystyle.
Available modes are:
- Center (Center the banner/text on both axis)
- XCenter (Center the banner/text on X axis)
- YCenter (Center the banner/text on Y axis)
Add a banner to another easily.
from pystyle import Add
banner1 = '''
.--.
.'_\/_'.
'. /\ .'
"||"
|| /\
/\ ||//\)
(/\\||/
____\||/____'''
text = "This is a beautiful banner\nmade with pystyle"
print(Add.Add(banner1, text, 4))Output:
.--.
.'_\/_'.
'. /\ .'
"||" This is a beautiful banner
|| /\ made with pystyle
/\ ||//\)
(/\||/
____\||/____
banner1 = first banner
text = second banner
4 = blank lines before adding the smallest banner to the biggest banner (default=0). Set to True to center it
Make beautiful boxes easily!
from pystyle import Box
print(Box.Lines("Hello, Welcome to Pystyle."))
print(Box.DoubleCube("Hello, Welcome to Pystyle."))Output:
─══════════════════════════☆☆══════════════════════════─
Hello, Welcome to Pystyle.
─══════════════════════════☆☆══════════════════════════─
╔════════════════════════════╗
║ Hello, Welcome to Pystyle. ║
╚════════════════════════════╝
Available modes are:
- Lines
- SimpleCube
- DoubleCube
Show cursor!
from pystyle import Cursor
Cursor.ShowCursor()Hide cursor!
from pystyle import Cursor
Cursor.HideCursor()from pystyle import System
System.Init()from pystyle import System
System.Clear()from pystyle import System
System.Title("The title")Notice: this feature only work on windows
Notice This feature is only working on windows
from pystyle import System
System.Size(12,12)from pystyle import System
System.Command("echo hello")👤 GitHub: @billythegoat356
👤 GitHub: @loTus01
👤 GitHub: @BlueRed
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!




