Skip to main content

A tool for building simple CLIs

Project description

CLI Forge

A tool for building simple CLIs

Installation

pip install pick

Input

Basic

from cli_forge import cli_forge

basic_input = cli_forge.cli_prompt("What is your name?")

Select

from cli_forge import cli_forge

select_input = cli_forge.cli_prompt("What currency will you be using?", options=["£", "$"], select=True)

Multi-select

from cli_forge import cli_forge

multi_select_input = cli_forge.cli_prompt("Which languages would you like to include?", options=["English", "Italian", "Spanish"], options_format=["EN", "IT", "ES"], multiselect=True)

Options

  • prompt: prompt above the options
  • options: (optional) list of options
  • select: (optional) if True, allows you select an option
  • multiselect: (optional) if True, allows you to select multiple options
  • options_format: (optional) allows you to format your output for use in your program

Input

Usage

from cli_forge import cli_forge

cli_forge.cli_progress(10, 1, "Fetching data...")
# function
cli_forge.cli_progress(10, 2, "Fetching data...")
# ...

Options

  • length: number of progress units
  • progress: progress level (out of length)
  • prefix: text before the progress bar
  • size: (optional) progress bar size on screen
  • end: (optional) if True, allows you to end the progress bar before it completes

Project details


Download files

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

Source Distribution

cli_forge-0.0.4.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

cli_forge-0.0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file cli_forge-0.0.4.tar.gz.

File metadata

  • Download URL: cli_forge-0.0.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for cli_forge-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1a84b38ae74b74ede2c4c722692f6cb4829cb26d770fe2d5eadb71486c3644c8
MD5 b2c90bd38f07b9d7dd7c87e38041e5d7
BLAKE2b-256 5ec6299eeccd2a311aefd0ac364aa4b4ad4f2adea922023c0ea5bb271d8b0062

See more details on using hashes here.

File details

Details for the file cli_forge-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cli_forge-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for cli_forge-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 220e4df252e30054f6944db98d8857c2bb15be1dc535788ef81a298bcf37b332
MD5 248966418a43544d9945981e46d60729
BLAKE2b-256 36f4a14301667b71aceb1bd8e574048a20998b7983e3ce849c26c31c9bc699fd

See more details on using hashes here.

Supported by

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