Metadata-Version: 1.1
Name: minicli
Version: 0.1.0
Summary: Minimalist CLI.
Home-page: https://framagit.org/drone/minicli
Author: Yohan Boniface
Author-email: yohan.boniface@data.gouv.fr
License: WTFPL
Description: # Minicli
        
        Expose functions in the command line. Minimalist and pythonic.
        
        Supports annotations and async functions.
        
        
        # Usage
        
        Example program:
        
            from minicli import cli, run
        
        
            @cli
            def greetings(name, age: int, deaf=False):
                """This is an example program
        
                :name: The name of the person we want to greet
                :age: The age of the person we want to greet
                :deaf: If the person is deaf, we can write louder
                """
                msg = "Hi {}! So you are {} years old".format(name, age)
                if deaf:
                    msg = msg.upper()
                print(msg)
        
        
            if __name__ == '__main__':
                run()
        
        Example usage:
        
            $ myprogram.py --help
            usage: myprogram.py [-h]  ...
        
            optional arguments:
              -h, --help  show this help message and exit
        
            Available commands:
        
                greetings
                          This is an example program
        
            $ myprogram.py greetings --help
            usage: __init__.py greetings [-h] [--deaf] name age
        
            positional arguments:
              name        The name of the person we want to greet
              age         The age of the person we want to greet
        
            optional arguments:
              -h, --help  show this help message and exit
              --deaf, -d  If the person is deaf, we can write louder
        
            $ myprogram.py greetings bob 19
            Hi bob! So you are 19 years old
        
            $ myprogram.py greetings bob 19 --deaf
            HI BOB! SO YOU ARE 19 YEARS OLD
        
            $ myprogram.py greetings bob nineteen
            usage: myprogram.py greetings [-h] [--deaf] name age
            myprogram.py greetings: error: argument age: invalid int value: 'nineteen'
        
Keywords: cli command line interface
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
