Create CLIs with classes and type hints.
Project description
Cliar
Create a CLI from a Python class, make it powerful with type hints.
Cliar is a Python tool that helps you create commandline interfaces:
from cliar import Cliar
class Git(Cliar):
'''Git clone created with Cliar'''
def clone(self, repo, dir='.'):
'''Clone a git repo from REPO to DIR.'''
print(f'Cloning from {repo} to {dir}')
if __name__ == '__main__':
Git().parse()
Run the script:
$ python git.py clone http://foo.bar -d baz
Cloning from http://foo.bar to baz
Requirements
Cliar runs with Python 3.6+ on Windows, Linux, and Mac. There are no external dependencies.
Install
Install Cliar from PyPI with pip:
$ pip install cliar
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 Distribution
cliar-1.2.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
cliar-1.2.0-py3-none-any.whl
(12.6 kB
view hashes)