clii | Python 3.7 function annotations - CLI | Command Line Interface library
kandi X-RAY | clii Summary
kandi X-RAY | clii Summary
clii is a Python library typically used in Utilities, Command Line Interface applications. clii has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install clii' or download it from GitHub, PyPI.
Generate argument parsers from Python 3 function annotations with minimal boilerplate. Okay, you and I both know the last thing that anyone needs is another way to generate command line interfaces. The idea of adding an additional dependency to your project just so you can learn yet another only-slightly-more-ergonomic-than-stdlib interface for parsing args is right up there with rewriting all your Makefiles in whatever flavor-of-the-week Javascript-based build system. I get it. Yes, instead of writing this library I should probably do something actually useful like try to find a life partner or see how much grain alcohol I can drink within the span of an X-Files episode, but each time I'm typing out some overly verbose argparse incantation that I had to look up on docs.python.org for the sixteenth time in a year, one of the few remaining shreds of childlike wonder for computing left in my over-caffeinated heart gets crosslegged and sets itself on fire. Click is the equivalent of calling in an architect to fix your kitchen sink. It's a lot of code and the interface is wordy and unintuitive. Docopt is neat but it's slow, a novelty, also a ton of code, and I have to read 3 examples each time before I use it. Argparse is an alright builtin, and the noble progenitor of this library, but it's overly verbose and the common task of wiring up subparsers that call functions is a pain.
Generate argument parsers from Python 3 function annotations with minimal boilerplate. Okay, you and I both know the last thing that anyone needs is another way to generate command line interfaces. The idea of adding an additional dependency to your project just so you can learn yet another only-slightly-more-ergonomic-than-stdlib interface for parsing args is right up there with rewriting all your Makefiles in whatever flavor-of-the-week Javascript-based build system. I get it. Yes, instead of writing this library I should probably do something actually useful like try to find a life partner or see how much grain alcohol I can drink within the span of an X-Files episode, but each time I'm typing out some overly verbose argparse incantation that I had to look up on docs.python.org for the sixteenth time in a year, one of the few remaining shreds of childlike wonder for computing left in my over-caffeinated heart gets crosslegged and sets itself on fire. Click is the equivalent of calling in an architect to fix your kitchen sink. It's a lot of code and the interface is wordy and unintuitive. Docopt is neat but it's slow, a novelty, also a ton of code, and I have to read 3 examples each time before I use it. Argparse is an alright builtin, and the noble progenitor of this library, but it's overly verbose and the common task of wiring up subparsers that call functions is a pain.
Support
Quality
Security
License
Reuse
Support
clii has a low active ecosystem.
It has 42 star(s) with 3 fork(s). There are 1 watchers for this library.
There were 1 major release(s) in the last 12 months.
There are 1 open issues and 3 have been closed. On average issues are closed in 8 days. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of clii is 1.0.3
Quality
clii has 0 bugs and 0 code smells.
Security
clii has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
clii code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
clii is licensed under the MIT License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
clii releases are not available. You will need to build from source code and install.
Deployable package is available in PyPI.
Build file is available. You can build the component from source.
Installation instructions are not available. Examples and code snippets are available.
clii saves you 105 person hours of effort in developing the same functionality from scratch.
It has 275 lines of code, 30 functions and 6 files.
It has high code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed clii and discovered the below as its top functions. This is intended to give you an instant insight into clii implemented functionality, and help decide if they suit your requirements.
- Decorate a function
- Create an argument from a parameter
- Adds self to argument parser
- Return a sequence of arguments from a function
- Get help from a function
- Get the list of function parameters
- Add an argument to the parser
Get all kandi verified functions for this library.
clii Key Features
No Key Features are available at this moment for clii.
clii Examples and Code Snippets
Copy
#!/usr/bin/env python3.8
"""
A really lame version of git.
"""
from pathlib import Path
import typing as t
from clii import App, Arg
cli = App(description=__doc__)
cli.add_arg('--verbose', '-v', action='store_true', default=False)
@cli.cmd
def
Copy
#!/usr/bin/env python3.8
from clii import App, Arg
from pathlib import Path
from subprocess import run
cli = App()
@cli.cmd
def add(a: int, b: int = 3):
print(a + b)
@cli.cmd
def subtract(path: Path):
run(f'rm -rf {path}')
if __name__ ==
Copy
import clii
cli = clii.App()
@cli.cmd
def foo(bar: str):
"""
Args:
bar: some kind of helpful docstring.
"""
cli.run()
Community Discussions
Trending Discussions on clii
QUESTION
How to skip `(Y/n)` prompt when running firebase login
Asked 2020-Jun-04 at 14:31
I am trying to set up firebase CLI in my continuous integration (travis-ci, not that it really matters) and I inevitably have to login to firebase.
...ANSWER
Answered 2020-Jun-04 at 03:58The documentation is pointing you to use login:ci
to provide the token directly in the command line using CI environments. You're using login
, which is meant for interactive shells.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install clii
You can install using 'pip install clii' or download it from GitHub, PyPI.
You can use clii like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
You can use clii like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page