Socket
Socket
Sign inDemoInstall

pybud-gui

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pybud-gui

Create beautiful console GUIs in python, using Widgets, Dialogs, and more!


Maintainers
1

Readme

PyBUD: Python Beauty

A python library for creating beautiful GUIs in console, with tons of different components, such as Dialogs, Widgets, Drawables, 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

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:

# import the main dialog class
from pybud.gui.dialog import AutoDialog
# import widgets
from pybud.gui.widgets import WidgetLabel
# import types
from pybud.deftypes import Point, Size

and build the dialog in just 3 lines of code!

# build the main dialog, set width and background color
d = AutoDialog(width=60, background_color=(90, 90, 250))
# add the main widget, set text, width and position
d.add_widget(WidgetLabel("Hello world!", pos=Point(y=1), size=Size(w=60)))
# show the dialoge
d.show()

Output:

Build Your First Dialog

Colored Text In Dialogs

first import classes:

# import the main dialog class
from pybud.gui.dialog import AutoDialog
# import widgets
from pybud.gui.widgets import WidgetLabel
# import `ColoredString` (using this class you can define text with color)
from pybud.drawing import ColoredString as CStr
# import types
from pybud.deftypes import Point, Size

and build the dialog just like above, but with ColoredString

# build the main dialog, set width and background color
d = AutoDialog(width=60, background_color=(90, 90, 250))
# add a label widget, set text, width and position
d.add_widget(WidgetLabel(
    # define a ColoredString object that renders text with colors
    # you can set both forecolor and backcolor
    text=CStr("Hello world!", forecolor=(90, 250, 90)),
    pos=Point(y=1),
    size=Size(w=60)
    )
)
# show the dialog
d.show()

Output:

Colored Text In Dialogs

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc