Skip to main content

effective and intuitive CLI framework

Project description

RTPY is an intuitive and effective CLI framework which is scalable and practical.

The most common use case might be an alternative of Python’s argparser, also you can enrich your terminal commands by using wisepy.

The terminal utilities have been removed from wisepy. One project, one goal.


pip install -U Redy rbnf wisepy


from wisepy.talking import Talking
talking = Talking()

def add(left: 'an integer', right: 'another integer'):
    add up two numbers.
    left = int(left)
    right = int(right)
    return left + right

if __name__ == '__main__':

And then use this python script:

cmd> python add --help # not only `cmd`, support all terminal as well.

      add up two numbers.

  - left(positional or keyword arg)  : an integer
  - right(positional or keyword arg) : another integer

cmd> python add 1 2


Another example here shows that wisepy can translate python functions with any kinds of parameter signatures into terminal command.

def another(*args,
            to_float: bool = False,
            additional_add: int = None):
    my sum command

    # using type annotation in keyword argument makes the argument
    # cast to the specific type.

    ret = sum(map(int, args))

    if double:
        ret = ret * 2

    if to_float:
        ret = float(ret)

    if additional_add:
        ret += additional_add

    return ret

See terminal:

cmd> python sum --help

      my sum command

  - args(*args)
  - to_float(keyword only) = False      : <class 'bool'>
  - double(keyword only) = None
  - additional_add(keyword only) = None : <class 'int'>

cmd> python sum 1 2 3


cmd> python sum 1 2 3 --double


cmd> python sum 1 2 3 -additional_add 5 --double --to_float


Project details

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 Distribution

wisepy-0.2.10-py3-none-any.whl (8.1 kB view hashes)

Uploaded 3 6

Supported by

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