- 授权协议: Apache
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: https://github.com/google/python-fire
- 软件文档: https://github.com/google/python-fire/blob/master/README.md
- 官方下载: https://github.com/google/python-fire
软件介绍
Python Fire 是 Google 开源的一个可从任何 Python 代码自动生成命令行接口(CLI)的库。
Python Fire 是一种在 Python 中创建 CLI 的简单方法。
Python Fire 是开发和调试 Python 代码的有用工具。
Python Fire 帮助探索现有代码或将其他人的代码转换为CLI。
Python Fire 使 Bash 和 Python 之间的转换更为容易。
Python Fire 通过使用你需要导入和创建的模块和变量来设置 REPL,使得使用 Python REPL 更容易。
简易示例:
import fire class Calculator(object): """A simple calculator class.""" def double(self, number): return 2 * number if __name__ == '__main__': fire.Fire(Calculator)
然后,你可以运行:
python calculator.py double 10 # 20 python calculator.py double --number=15 # 30
A=B
Marko Petkovsek、Herbert S. Wilf、Doron Zeilberger / AK Peters, Ltd. / 1996-01 / USD 49.00
At some point, this book describes methods of solving the problem raised by Donald E. Knuth in the classical book "The Art of Computer Programming, Volume 1: Fundamental Algorithms". The main purpo......一起来看看 《A=B》 这本书的介绍吧!
