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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompt_smart_menu-0.1.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompt_smart_menu-0.1-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file prompt_smart_menu-0.1.tar.gz.

File metadata

  • Download URL: prompt_smart_menu-0.1.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for prompt_smart_menu-0.1.tar.gz
Algorithm Hash digest
SHA256 18511dd33583734132538b36cde6c95fab4bcaba57b39d4d4815960bc5883155
MD5 0c7e9888fc99c956a5e278e4b36d0d5b
BLAKE2b-256 b8f1b0290ca34206c72a03d4f4b929cf9bb87cf70be311c34a5eb2ac94481e1f

See more details on using hashes here.

File details

Details for the file prompt_smart_menu-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: prompt_smart_menu-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for prompt_smart_menu-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2817a3731baa6cba9ce21880771838b697a02f58ca04f98a51e72e517732c11f
MD5 0a6f423493d2270e1bac18b30b94586a
BLAKE2b-256 f32bfe7d34dd5ed067cec53354ba858dc2f19e63655c0ec9115745ce0f292094

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page