Understanding Python: Argparse CLI

preview_player
Показать описание
In this video, I go over how to write a CLI using argparse.
Included in the lesson is how to create a parse, add arguments, and parse the arguments. Additionally, I show a number of features argparse offers for arguments and options.
As always, if you have any questions or suggestions for future videos, please leave a comment down below.

Timelapse music: 失望した by Eva
Outro music: Elix by Synthness
Рекомендации по теме
Комментарии
Автор

I just wanted to send a little something extra besides my already likes/ shares of your videos. Thank you for these well explained videos, you've helped me so much as I learn things about Python. Your voice and style are calming and your videos are very much underrated in my opinion. Keep going! 💪🏻🎉

dragonkat
Автор

Watched a bunch of arg parse tutorials prior to this one but yours is the best without question. You explained all the concepts I was looking to learn like actions, and dest so well. Thank you!

victorhorowitz
Автор

The google algorithm brought me here...
Instant "like" and "subscribe"; this content is absolute gold.
Clear explanations with a low-key voice at a controlled pace .
This channel is criminally underrated, hope you get a million subs

topcivilian
Автор

Thank you so much! Manual CLI Processing & Argparse CLI are awesome tutorials! I like how you explained these concepts through building pizza. After these tutorials I was able to go through Python documentation for Argparse and understand what is written there :) And also I like how calm your voice is, it helps me lose my anxiety when I sit down to learn new coding concept :) Thanks for keeping it simple & clean!

talgatm
Автор

One of the best argparse Vedios, so well explained. Loved the pace. Each concept. Of type of args, args as flags are superbly explained.

mikasa
Автор

Thanks for sharing (and convincing me to integrate ChatGPT)!

jpcoffelt
Автор

Great tutorial, this is a clear and very straight forward video that I have come across. GREAT!!!

caribtree
Автор

Great, constructive, informative tutorial!
Chioce tricks for parser is really helpful.
Thank you!

HeywardLiu
Автор

That's a very well thought and well executed tutorial. Much appreciated.

mahboobalam
Автор

10:42 you can also set up VSCode to use the popular Python formatter called Black to automatically format the file on save so the line length stays under control as you work

metal
Автор

Thanks for the explanation! It helped a lot :)

harunyesevi
Автор

argparse.add_argument is one of a few examples where one should use long line formatting, with columns of matching parameters aligned. Think of dozens of parameters ...

falklumo
Автор

You should have covered how to include default settings in help texts.

falklumo
Автор

Thanks a ton for the video. I'm trying to get argument "price<20" but since its not iterable I can't use options. Can you advise what can be used instead?

tsankailieva
Автор

Already commented on the other videos but I´ll do it for the networking effect :D

Thanks so much for these videos, it´s super easy to follow along because you are calm, speak clearly and obviously know what you´re doing :)
All of the videos have already helped me a lot as I am a super beginner with quite an ambitious project going on. Reading library documentation is like a big adventure :D

Additionally I have a question:
Is it possible to build something like food_builder (derived from your pizza builder) which

1. does not have to be called with "python food_builder.py" only with "food_builder ..."
2. has subcommands like:


food_builder pizza [arguments]
food_builder pasta [arguments]

Your answers would be greatly appreciated


jonas