TUI wrapper for CLI arguments
Project description
1. One line description
A library to present all the arguments your script accepts in a TUI (terminal user interface, using ncurses, that can be navigated with the arrow keys), so that users can easily figure out what all of them are and do.
2. Information for users
2.1. Installation
You don't want to use this repository directly. Instead you should "install" the latest released version by running this command:
$ python -m pip install tuiargs
2.2. User guide
Check this file for the full guide.
You can also access this same information from python itself:
import tuiargs
help(tuiargs)
All public classes and functions are fully documented:
import tuiargs
help(tuiargs.Build)
...
3. Information for developers
3.1. Development environment
Make sure you have all python modules listed in "dependencies" section found inside the pyproject.toml file already installed, if not, use your distro package manager to install them:
$ cat pyproject.toml | awk '/dependencies/,/]/'
$ pacman -S ...
NOTE: This (installing dependencies through the global package manager) is
preferred to creating a virtual environment and using "python -m pip
install" inside of it because it makes it simpler to run the examples.
If you insist on using a virtual environment, this is what you need to do:
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install .
Next, update the value of PYTHONPATH to make sure it searches for "tuiargs" in the current folder (where the source code is) instead of in system paths (in case you had already "pip install"ed it in the past):
$ export PYTHONPATH=`pwd`:$PYTHONPATH
You can now run the different included examples like this:
$ python examples/hello_world.py
$ python examples/git_wrapper.py
3.2. Running the code linter
Before merging new changes you must also check that the following command returns an empty list of warnings:
$ ruff check .
NOTE: You might need to install "ruff" first. If so, use your distro's package manager.
3.3. Distribution
The source code in this repository is meant to be distributed as a python package that can be "pip install"ed.
Once you are ready to make a release:
-
Increase the "version" number in file "pyproject.toml"
-
Run the next command:
$ python -m pip install --upgrade build $ python -m build
-
Publish the contents of the "dist" folder to a remote package repository such as PyPi (see here)
-
Tell your users that a new version is available and that they can install it by running this command:
$ python -m pip install tuiargs
NOTE: If "python -m build" returns an error, you probably have to install the "python-build" package first, either using your package manager (preferred) or inside a virtual environment. If you choose the latter, make sure you use the "--copies" flag when creating the virtual environment or else you will later get errors about symbolic links when creating the package:
$ python -m venv --copies .my_venv
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tuiargs-0.9.0.tar.gz.
File metadata
- Download URL: tuiargs-0.9.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88568ddddb13b9dbcec98386d76b0f90928198fac4dcc3313b805b5824f33ac6
|
|
| MD5 |
8c62ca9276c562fd99904205876f0b8f
|
|
| BLAKE2b-256 |
09a0c5639b64a21419e34739d7533faa722f0a61bd1a09e9c43aa7fa79a9e158
|
File details
Details for the file tuiargs-0.9.0-py3-none-any.whl.
File metadata
- Download URL: tuiargs-0.9.0-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ee4658802f2c3eae278278a9270a1d444c59a846d8fc39e80d4439ccec90b26
|
|
| MD5 |
daf85e3c29eb3cb911f99ceccee6bd5e
|
|
| BLAKE2b-256 |
648d7e56f787d998bb19c421582fd3bbb347b7a1cd5a68596b06389cc7609d4f
|