No video

Argument Parsing with argparse in Python

  Рет қаралды 14,038

NeuralNine

NeuralNine

Күн бұрын

In this video today, we learn how to do argument parsing for command line applications in Python.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
💼 Services 💼
💻 Freelancing & Tutoring: www.neuralnine.com/services
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord

Пікірлер: 15
@RameshBaburbabu
@RameshBaburbabu 9 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 🚀 Introduction to argparse in Python - Understanding the purpose of the video: learning how to build CLI applications and parse arguments using the argparse package in Python. - Overview of command line applications and their common structure, similar to tools like 'curl' or 'grep'. - Brief explanation of the plan to build a simple CLI tool named "Adder" that performs addition with various options. 01:11 🧰 Setting up argparse and defining positional arguments - Importing the argparse package and creating an argument parser instance. - Demonstrating the addition of a positional argument ('greeting') with a description for user interaction. - Showing how to parse the provided arguments and print the results. 04:21 🎯 Adding flags and options for flexibility - Introducing the concept of flags and options, with an example using a float type and multiple arguments. - Discussing the use of '*' for an unlimited number of arguments and demonstrating the sum of provided numbers. - Highlighting the ability to limit choices for an argument, using the 'verbosity' argument with integer type and predefined choices. 08:55 📂 Advanced options: File flag and handling true/false flags - Briefly mentioning the possibility of adding a file flag and storing results in a file instead of printing. - Demonstrating the use of a boolean flag ('debug') with the 'store true' action for enabling debug mode. - Providing a simple example of using debug mode to measure and print the execution time of the program. 10:56 🎬 Conclusion and Call to Action - Summarizing the key points covered in the video. - Encouraging viewers to like, comment, subscribe, and hit the notification bell. - Expressing gratitude for watching and signing off.
@PoeLemic
@PoeLemic 9 ай бұрын
Wow, with this tutorial, it seems very simple to send in parameters to Python apps. This really helps me with learning python. I've been trying to build up my skills. This really helps.
@endless_paradigm
@endless_paradigm 9 ай бұрын
This is great for understanding. An alternative would be to use click package.
@paulthomas1052
@paulthomas1052 9 ай бұрын
Thanks for another great demo.
@zorrcc
@zorrcc 9 ай бұрын
Great tutorial, I bet that you will gain more audience soon 😁
@daburrito5296
@daburrito5296 9 ай бұрын
Literally looking into this a couple of hours ago, it's crazy that you just so happened to drop a tutorial today. Thanks for everything you do!
@JasonGranzow
@JasonGranzow 9 ай бұрын
Please increase the font size. This is so hard to read on mobile.
@user-ry5zu1wo4e
@user-ry5zu1wo4e 2 ай бұрын
Amazing lessons thanks
@dmitrychuveev6610
@dmitrychuveev6610 9 ай бұрын
Thank you for this tutorial.
@ankushbhagatofficial
@ankushbhagatofficial 9 ай бұрын
What a great tutorial ❤❤
@learnenglishcomputer2644
@learnenglishcomputer2644 6 ай бұрын
can you help me predict the next series of numbers if i give you the previous 30 numbers by using python and ML? please
@learnenglishcomputer2644
@learnenglishcomputer2644 6 ай бұрын
can you help me predict the next series of numbers if i give you the previous 30 numbers i want each number in the series compared to from the next series by using python and ML deep L ? please
@llllllllllllllllllllllllll4345
@llllllllllllllllllllllllll4345 7 ай бұрын
thank you !!!
@leftblank5315
@leftblank5315 9 ай бұрын
Use click, hell lota easier
@asdjzcx2619
@asdjzcx2619 9 ай бұрын
It is better and more clear then using sys.argv
Python Sockets Simply Explained
39:33
NeuralNine
Рет қаралды 159 М.
Garbage Collection in Python: Speed Up Your Code
16:41
NeuralNine
Рет қаралды 15 М.
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 14 МЛН
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 26 МЛН
15 Python Libraries You Should Know About
14:54
ArjanCodes
Рет қаралды 381 М.
Argument Parsing - Advanced Python Tutorial #4
15:51
NeuralNine
Рет қаралды 81 М.
python argparse tutorial (beginner - intermediate) anthony explains #044
21:10
Python модуль argparse
33:44
python samurai
Рет қаралды 19 М.
*Args and **Kwargs in Python
3:49
b001
Рет қаралды 261 М.
If __name__ == '__main__' for Python Beginners
9:29
Indently
Рет қаралды 18 М.
Make Your Python Code More Professional
19:43
NeuralNine
Рет қаралды 63 М.
What Are * and / Parameters in Python Functions?
5:44
NeuralNine
Рет қаралды 41 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 395 М.