3 ms·
I personally enjoy using https://github.com/google/python-fire https://github.com/google/python-fire nowadays. -- it's probably not the most flexible tool, but
by fabioz 6y ago
I personally enjoy using https://github.com/google/python-fire https://github.com/google/python-fire nowadays.
-- it's probably not the most flexible tool, but IMHO it's the one with the best API: fire.Fire(obj) and everything else is taken care of ;)
p.s.: for lazy imports, just don't put them in the top of your module in the entry point.
- minimaxir 6y agoFire plays nice with package entry_points as well. Here's a very minimal CLI for one of my PyPI packages: https://github.com/minimaxir/aitextgen/blob/master/aitextgen/cli.py https://github.com/minimaxir/aitextgen/blob/master/aitextgen...