News for hackers. Stuff that matters.
Re:Hypermodern Python by fabioz on Thursday May 28, 2020 @09:45AM (#23337130)
I personally enjoy using 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.

Re:Hypermodern Python by minimaxir on Thursday May 28, 2020 @12:16PM (#23339030)
Fire 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...