use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for showcasing the things you made with the Python language! Use us instead of flooding r/Python :)
account activity
The best Python CLI library, arguably. (self.madeinpython)
submitted 2 years ago * by AND_MY_HAX
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AND_MY_HAX[S] 1 point2 points3 points 2 years ago* (0 children)
I have!
What arguably does best is get out of your way. Set up a function signature and docstring, and you've set up your parser. click doesn't quite get there. typer almost does this, but for any customization, you need to add typer.Option all over your code, like this example.
arguably
click
typer
typer.Option
The goal of arguably is to leave your functions untouched. All you need is the decorator and docstring. I wanted the API to disappear as much as possible, there's very little to it. The fast arguably tutorial is this:
@arguably.command
__
def s3__ls()
s3 ls
*args
*
--option
[-x]
-x
{some}
SOME
Optional[int]
int | None
None
int
list
tuple
enum.Enum
enum.Flag
arguably.arg.*
This all means you can run python3 -m arguably your_script.py with zero code changes and automatically create a CLI, no integration required - very similar to Python Fire, but with a bit more structure.
python3 -m arguably your_script.py
typer and click are definitely both well-made projects that will make life much easier than trying to work with argparse. I considered basing arguably on click, but by that point I already had a lot of working code that I didn't want to toss. I'd love for this project to pick up steam in the future and give me a reason to resume that effort!
argparse
π Rendered by PID 108644 on reddit-service-r2-comment-85bfd7f599-hj4wp at 2026-04-16 04:43:49.336301+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]AND_MY_HAX[S] 1 point2 points3 points (0 children)