A framework for a line based TUI
Project description
Achieving Seamless Performance In Real-time Environments
Note:
This is the official rewrite of TUI/SWARM by the original inventor/author Simon Arjuna Erat.
Please be aware that this is an unstable work in progress, and some references in this text may refer to habits/behaviour based on the original BASH source code.
Brief
ASPIRE is a Python 3.11+ module that offers an easy to use line-based text user interface framework.
It aims to make the console output more appealing to end users and provide developers an easy to use framework for 'everyday tasks' and to put their output left, center and right oriented with some 'dividers' (header, title) using a theme for presentation.
Target Audience
For developers aiming to enhance the user experience with the console.
Detail
ASPIRE simplifies common tasks by providing various functions that wrap around frequently used code. It serves as a three-way interface between the system (MS Windows, any *Nix based system, and even Apple's iOS), the author/developer, and the end user.
One of ASPIRE's key focuses is to enhance the console experience by offering themable designs. You, as the author, can choose from a variety of ASCII-based themes that include colors, symbols, bold and underline fonts, and more. Users also have the option to select a different theme or even create their own (if you allow so).
ASPIRE is designed with simplified usability in mind for both end users and developers.
These functions aim to streamline interactions and improve the overall experience.
To name a few of these convenient functions:
All descriptions are based on the default theme.
Name | Description |
---|---|
header | Will print a blue background accross the whole console 'surrounded' by borders. It will accept up to 3 strings. |
title | Will print the borders, and fill the space in between with the foreground color (white), and use the background color for the font. This function accepts only 1 string, which will be printed in the center of the line. |
Standart output, prints borders in foreground color and accepts up to 3 strings. Will allign them as follows: 1. Left 2. Left, Right 3. Left, Center, Right |
|
ask | Printing borders and the passed question, encapsules the default input , returns the input. |
yesno | Similar to ask , but will only accept yes/no, returns according bool. |
select | Pass a list as argument, uses list to print them. Returns the string of the shown/entered number. |
list | Used by select to print a number to each item of the list |
bar | Provides a progress bar with different options that can be used within the project. |
Usage
The code for the previous preview would look as simple as this, which is how you can use it as library in your projects:
from aspire import Aspire as tui
tui.header("Aspire by (sea/sri-arjuna)", "Date + Time")
tui.title("Hello World")
tui.printe("Left string", "Center string", "Right string")
tui.press()
This is how "Hello World" (using header
, title
and print
) can look like:
Installation
At least thats where i want to go:
pip install ASPIRE
For an example list of different use cases, please see: [USAGE]
Example:
How the original BASH shell variant with the classic theme looked like: (just to demonstrate how it might look.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ASPIRETUI-0.0.4.tar.gz
.
File metadata
- Download URL: ASPIRETUI-0.0.4.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e2c906d91a0c2b949f8ff971b7a835062ffa6493236a947cee822e246422cbb |
|
MD5 | a83b1fd93d666f831a994d8e8eef7b93 |
|
BLAKE2b-256 | 97a351018ae1ec4ef0487ed9dd52c5f1db3763db0aca6a0cac7ae6bd5c7e7759 |
File details
Details for the file ASPIRETUI-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ASPIRETUI-0.0.4-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8bbb1a8e24403e0b1ae2d07a328d473f64967835584bc6cad8a4167404d5660 |
|
MD5 | 4ef23857b36c70cf242691a70dbfcca7 |
|
BLAKE2b-256 | 3b141e60b934e34fd6ad78956d55a727f158e96171e8e7867ac45ea66dd1485b |