Skip to main content

Python based toolkit for writing Command-Line Interface applications

Project description

Downloads PyPI version Wheel Windows Build Status pyimp RTD licence Twitter Follow

Logo

Forever Scalable

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments brought about by the failure to execute a CLI API. Simple to code, easy to learn, and does not come with needless baggage.

Quo requires Python 3.6.1 or later.

Features

  • Support for Ansi, RGB and HTML color models
  • Support for tabular presentation of data
  • Interactive progressbars
  • Code completions
  • Nesting of commands
  • Automatic help page generation
  • Syntax highlighting
  • Autosuggestions
  • Key Binders

Getting Started

Installation

You can install quo via the Python Package Index (PyPI)

pip install -U quo

quo.echo

Example 1

   import quo

   quo.echo(f"Hello, World!", fg="red", italic=True, bold=True))

Hello World

Example 2

   import quo

   quo.echo(f"Quo is ", nl=False)
   quo.echo(f"scalable", bg="red", fg="black") 

Scalable

Unlike the builtin print function, echo function has improved support for handling Unicode and binary data. It also supports handling of ANSI color sequences.

quo.prompt

   import quo

   quo.prompt("What is your name?")

quo.prompt

quo.Prompt

   import quo
   
   session = quo.Prompt(bottom_toolbar="Python 🐍 is great")
   session.prompt("Type something:") 

quo.Prompt.prompt

Quo autocompletion

   # Press [Tab] to autocomplete
   import quo

   completer = quo.completion.WordCompleter(['USA', 'UK', 'Canada', 'Kenya'])
   session = quo.Prompt(completer=completer)
   session.prompt('Which country are you from?: ')

Autocompletion

Quo frame

  
   import quo

   @quo.command()
   @quo.app("@frame", help="Print a frame")

   def _frame(frame):
    """ Example of a simple layout"""
   content = quo.widgets.TextArea(text="Hello world🌍")
   quo.container(
        quo.widgets.Frame(
            content,
            title="Quo: python🐍")
         )

   if __name__ == "__main__":
       _frame()

Frame

Quo tabular

   import quo


   table = [
     ["Name", "Gender", "Age"],
     ["Alice", "F", 24],
     ["Bob", "M", 19],
     ["Dave", "M", 24]
   ]

   quo.echo(quo.tabular(table))

tabulate

For more intricate examples, have a look in the examples directory and the documentation.

Donate🎁

In order to for us to maintain this project and grow our community of contributors. Donate

Quo is...

Simple If you know Python you can easily use quo and it can integrate with just about anything.

Getting Help

Gitter

For discussions about the usage, development, and future of quo, please join our Gitter community

Resources

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at Bug tracker

License📑

License: MIT
This software is licensed under the MIT License. See the License file in the top distribution directory for the full license text.

Code of Conduct

Code of Conduct is adapted from the Contributor Covenant, version 1.2.0 available at Code of Conduct

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

quo-2021.7-py3.9.egg (1.1 MB view details)

Uploaded Egg

quo-2021.7-py3-none-any.whl (489.7 kB view details)

Uploaded Python 3

File details

Details for the file quo-2021.7-py3.9.egg.

File metadata

  • Download URL: quo-2021.7-py3.9.egg
  • Upload date:
  • Size: 1.1 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for quo-2021.7-py3.9.egg
Algorithm Hash digest
SHA256 b4d496ed4f12375d11385313d349d3a772c6dff114910dc12a4ade0cc62916a0
MD5 140ee3da80107379fb17f25db8b71332
BLAKE2b-256 50191c981593be3ee17551d1f5985543c47fa50a621ab3fe36da39961bb5af44

See more details on using hashes here.

File details

Details for the file quo-2021.7-py3-none-any.whl.

File metadata

  • Download URL: quo-2021.7-py3-none-any.whl
  • Upload date:
  • Size: 489.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for quo-2021.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f45bf1af5ede5cf00c43e0792c5d6c7abac64276c97c9c1a8c67fca58a44019f
MD5 427acfb6492a3e57a0b9a1075e515bd9
BLAKE2b-256 8e09e61a25da36ea341ae5447cc672e247d9b7c4ae937a05918eb4f2c456aae2

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