Skip to main content

Easy Widgets

Easy Widgets is a Python library designed to simplify widget management in CLI applications. It leverages the power of urwid to create dynamic and interactive command-line interfaces with ease.

Features

  • Simplifies the creation and management of CLI widgets.
  • Supports Python versions 3.7 and above.
  • Lightweight and easy to integrate into existing projects.

Installation

You can install Easy Widgets via pip:

pip install easy_widgets

Usage

Here’s a basic example of how to use Easy Widgets:

from easy_widgets import * 

Application.init()

menu = Menu("Just exit now")
menu.addOption("OK", lambda b,p: Application.exit())


name = ""
times = 0 

def setName(x):
    global name 
    name = x
def setTimes(x):
    global times 
    times = x

w = Wizzard(menu)\
    .withChoices("Select number", "times", [(1, "one"), (2, "two")])\
    .withInput("Enter your name", "name")\
    .withParam("name", setName)\
    .withParam("times", setTimes)


w.show()

Application.run()
print(name * times)

Refer to the documentation for more advanced usage.

Requirements

  • Python >= 3.7
  • urwid >= 3.0.0

Development

Setup

Clone the repository:

git clone https://github.com/fantastic001/easy_widgets.git
cd easy_widgets

Install dependencies:

pip install -r requirements.txt

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-name).
  3. Commit your changes (git commit -m "Add feature").
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for easy-widgets 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for easy-widgets 0.3
File Interpreter ABI Platform Actions
easy_widgets-0.3-py3-none-any.whl Python 3 none any Details for easy_widgets-0.3-py3-none-any.whl

Release files / easy_widgets-0.3-py3-none-any.whl

Download URL easy_widgets-0.3-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab0ffbab5e2f569caa6279fbc33aabb06bdafe219640627a4d5fade9905b10ad
BLAKE2b-256 checksum
How to use checksums
9f09798210c3a55b2d367fc102b4972db57f9caa825f29fac93d1f92fe1dbf06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for easy-widgets 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page