All Projects → billythegoat356 → pystyle

billythegoat356 / pystyle

Licence: EPL-2.0 license
The source of my Python library, pystyle.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pystyle

Pigar
☕️ A fantastic tool to generate requirements.txt for your Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)
Stars: ✭ 1,068 (+575.95%)
Mutual labels:  pypi, pip
Rules python
Experimental Bazel Python Rules
Stars: ✭ 233 (+47.47%)
Mutual labels:  pypi, pip
Dephell
📦 🔥 Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.
Stars: ✭ 1,730 (+994.94%)
Mutual labels:  pypi, pip
Try
Dead simple CLI tool to try Python packages - It's never been easier! 📦
Stars: ✭ 588 (+272.15%)
Mutual labels:  pypi, pip
PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+5.7%)
Mutual labels:  pypi, pip
Matrixprofile Ts
A Python library for detecting patterns and anomalies in massive datasets using the Matrix Profile
Stars: ✭ 621 (+293.04%)
Mutual labels:  pypi, pip
Fades
fades is a system that automatically handles the virtualenvs in the cases normally found when writing scripts and simple programs, and even helps to administer big projects.
Stars: ✭ 182 (+15.19%)
Mutual labels:  pypi, pip
Underscore.py
Python port of underscore.js
Stars: ✭ 277 (+75.32%)
Mutual labels:  pypi, pip
yavdb
Yet Another Vulnerability Database
Stars: ✭ 14 (-91.14%)
Mutual labels:  pypi, pip
Tml
🌈💻🎨 A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
Stars: ✭ 634 (+301.27%)
Mutual labels:  colors, tui
Piprot
How rotten are your requirements?
Stars: ✭ 409 (+158.86%)
Mutual labels:  pypi, pip
ios2androidres
Copy iOS image resources to their appropriate Android directory
Stars: ✭ 20 (-87.34%)
Mutual labels:  pypi, pip
Pip Upgrader
An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.
Stars: ✭ 340 (+115.19%)
Mutual labels:  pypi, pip
Python Pixabay
Python 3 Pixabay's API wrapper.
Stars: ✭ 32 (-79.75%)
Mutual labels:  pypi, pip
Pipx
Install and Run Python Applications in Isolated Environments
Stars: ✭ 4,398 (+2683.54%)
Mutual labels:  pypi, pip
Audioowl
Fast and simple music and audio analysis using RNN in Python 🕵️‍♀️ 🥁
Stars: ✭ 151 (-4.43%)
Mutual labels:  pypi, pip
allalgorithms-python
The All ▲lgorithms Python Library.
Stars: ✭ 31 (-80.38%)
Mutual labels:  pypi, pip
Py webauthn
A WebAuthn Python module.
Stars: ✭ 270 (+70.89%)
Mutual labels:  pypi, pip
Termenv
Advanced ANSI style & color support for your terminal applications
Stars: ✭ 555 (+251.27%)
Mutual labels:  colors, tui
pmm
PyPi Mirror Manager
Stars: ✭ 29 (-81.65%)
Mutual labels:  pypi, pip

PyStyle


Version Documentation Maintenance License: EPL-2.0 Downloads

PyStyle is a python library to make very beautiful TUI designs.
Inspired by pyfade and pycenter,
Developped by Billy, loTus01, and BlueRed

Install

pip3 install pystyle

Stats: https://pepy.tech/project/pystyle

FEATURES IN THE DOC

  • Colorate text ✔️
  • Colorate text with fade effect ✔️
  • Animations
  • Writing effects ✔️
  • Centered Text ✔️
  • Adding banners ✔️
  • Make boxes ✔️
  • Hide and Show Cursor
  • System Functions

Colorate text

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)

Colorate text with fade effect

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

Writing text with fade effect


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 text


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)



Adding banners

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 boxes

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


👤 Authors

👤 GitHub: @billythegoat356
👤 GitHub: @loTus01
👤 GitHub: @BlueRed

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].