clii:Python 3.7+函数注释-> CLI

时间:2024-03-28 22:06:14
【文件属性】:

文件名称:clii:Python 3.7+函数注释-> CLI

文件大小:10KB

文件格式:ZIP

更新时间:2024-03-28 22:06:14

cli command-line-parser command-line-interface Python

克利 从Python 3函数注释中以最少的样板生成参数解析器。 #!/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__ == '__main__' : cli . run () 没有依赖关系。 该库没有依赖关系,并且是一个文件。 您想要供应商吗? 供应商。 实施时间短。 花10分钟,浏览一下实现,说服自


【文件预览】:
clii-master
----bin()
--------publish.sh(91B)
----clii.py(8KB)
----test.py(563B)
----test_hello.py(440B)
----CHANGELOG(91B)
----LICENSE(1KB)
----setup.py(873B)
----.gitignore(2KB)
----test_clii.py(667B)
----test_bad_git.py(988B)
----README.md(5KB)

网友评论