Creating CLIs in Python with Click

preview_player
Показать описание
Click is a significantly more powerful and versatile alternative to the built-in argparse which makes it incredibly to create command-line interfaces in Python!



If you enjoy my content, consider supporting me on Patreon or becoming a member!

If you need help with anything, feel free to join the Discord server:

I get a lot of people asking, so here's my Visual Studio Code setup!



If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.

#python #coding #howto
Рекомендации по теме
Комментарии
Автор

Just wanted to note something I forgot to mention in the video: if you want to set a help message for any arguments or options, you can pass `help="message"`! Wasn't worth re-recording the whole thing for, but thought I'd mention it (:

Carberra
Автор

This is a great video, thank you. I think I will definitely use this over argparse

awesomegamer
Автор

I had terrible time with click's context: invoking subcommands. Click promises to handle arguments validation but doesn't do so for subcommand invocation with leads to reimplementation of entire validation logic and question "why would you use click in this case?". Since than I'm using argparse every single time, because you should type just a bit more but it is way more maintainable code.

RuslanKovtun
Автор

Now i know how to create a command line utility jaja

eduferreyraok
Автор

Seems like a great library! Very handy. I don't like the decorator stacking, though. It tickles my OCD, probably. One decorator is fine, two is pushing it, three or more is just foul.

blegh
Автор

Really missing comparison to the built in argparse library and why use click over argparse

auroragb
Автор

wow, i wasted many hours, thx for the tool👌👌

birdbeakbeardneck
welcome to shbcf.ru