PyBUD: Python Beauty
A python library for creating beautiful GUIs in console, with tons of different components, such as Dialog
s, Widget
s, Drawable
s, Drawer
, and more!
Installation
you can use pip:
pip install pybud-gui -U
or install from github:
pip install git+https://github.com/Amirali1059/pybud-gui.git
Documentation
Table of Contents:
Getting Started
Using pybud-gui you can easily build dialogs with just a few lines of code, so lets get started!
Build Your First Dialog
first import classes:
from pybud.gui.dialog import AutoDialog
from pybud.gui.widgets import WidgetLabel
from pybud.deftypes import Point, Size
and build the dialog in just 3 lines of code!
d = AutoDialog(width=60, background_color=(90, 90, 250))
d.add_widget(WidgetLabel("Hello world!", pos=Point(y=1), size=Size(w=60)))
d.show()
Output:
Colored Text In Dialogs
first import classes:
from pybud.gui.dialog import AutoDialog
from pybud.gui.widgets import WidgetLabel
from pybud.drawing import ColoredString as CStr
from pybud.deftypes import Point, Size
and build the dialog just like above, but with ColoredString
d = AutoDialog(width=60, background_color=(90, 90, 250))
d.add_widget(WidgetLabel(
text=CStr("Hello world!", forecolor=(90, 250, 90)),
pos=Point(y=1),
size=Size(w=60)
)
)
d.show()
Output: