Skip to main content

prompt_smart_menu is a library for building command line menus for terminal applications in Python. It allows you to create a multi-tiered argument parsing menu for executing different subcommands of a command line application.

Read the documentation on readthedocs.

Description

This library is designed around parsing a command string, not command line arguments. That is, it is intended to be used inside a python application using an input() type interface.

For command line arguments passed to the python script, a library such as argparse would be better suited. Though this library could be used for such purpose.

Though not required, this library was designed to augment the auto-completion feature of Python Prompt Toolkit. The prompt_toolkit library is very powerful, check it out!

Features

  • Declarative interface (That’s why I built this :] )

  • Integration with prompt_toolkit auto-completion

  • Support for python keyword arguments.

  • Different parsers for type casting arguments (e.g. numbers).

  • Ability to build custom argument parser.

  • Argument validation for endpoint functions.

  • Flexibility to mix options (e.g. parsers) for different subcommands.

  • No dependencies, though prompt_toolkit highly recommended.

Installation

pip install prompt_smart_menu

Getting started

See documentation on readthedocs.

Release files for prompt-smart-menu 0.1

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

Source distribution (sdist)

Source distribution for prompt-smart-menu 0.1
File Size Uploaded
prompt_smart_menu-0.1.tar.gz 32.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prompt-smart-menu 0.1
File Interpreter ABI Platform
prompt_smart_menu-0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 42.3 kB

Release files / prompt_smart_menu-0.1.tar.gz

Download URL prompt_smart_menu-0.1.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
18511dd33583734132538b36cde6c95fab4bcaba57b39d4d4815960bc5883155
BLAKE2b-256 checksum
How to use checksums
b8f1b0290ca34206c72a03d4f4b929cf9bb87cf70be311c34a5eb2ac94481e1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Release files / prompt_smart_menu-0.1-py2.py3-none-any.whl

Download URL prompt_smart_menu-0.1-py2.py3-none-any.whl
Size 9.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2817a3731baa6cba9ce21880771838b697a02f58ca04f98a51e72e517732c11f
BLAKE2b-256 checksum
How to use checksums
f32bfe7d34dd5ed067cec53354ba858dc2f19e63655c0ec9115745ce0f292094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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