A Deep Dive Into Pathlib And The Magic Behind It

ArjanCodes
ArjanCodes
46.5 هزار بار بازدید - 2 سال پیش - If you’re not yet using
If you’re not yet using pathlib for dealing with files and directories, you’re missing out. This video takes a close look at the pathlib library in Python and explains some of the magic that goes into it, as well as how you can use it in your own code.

The code I worked on in this video is available here: https://github.com/ArjanCodes/2022-pa...

💡 Get my FREE 7-step guide to help you consistently design great software: https://arjancodes.com/designguide.

💻 ArjanCodes Blog: https://www.arjancodes.com/blog

🎓 Courses:
The Software Designer Mindset: https://www.arjancodes.com/mindset
The Software Designer Mindset Team Packages: https://www.arjancodes.com/sas
The Software Architect Mindset: Pre-register now! https://www.arjancodes.com/architect
Next Level Python: Become a Python Expert: https://www.arjancodes.com/next-level...
The 30-Day Design Challenge: https://www.arjancodes.com/30ddc

🛒 GEAR & RECOMMENDED BOOKS: https://kit.co/arjancodes.

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

💬 Discord: https://discord.arjan.codes
🐦Twitter: Twitter: arjancodes
🌍LinkedIn: LinkedIn: arjancodes
🕵Facebook: Facebook: arjancodes
📱Instagram: Instagram: arjancodes

👀 Code reviewers:
- Yoriz
- Ryan Laursen
- James Dooley
- Dale Hagglund

🎥 Video edited by Mark Bacskai: Instagram: bacskaimark

🔖 Chapters:
0:00 Intro
0:55 Why not simply use strings
1:10 Issues with strings
2:20 Basic usage of pathlib
4:02 Back slashes and forward slashes
5:13 Reading file from a path
6:03 Resolving paths
6:41 Useful path properties
8:15 Checking whether path is a file or a directory
8:43 Creating and deleting files and directories
10:43 Reading paths from configuration files
11:13 Pathlib and Pydantic
12:31 Operator overloading in Python
16:34 Outro

#arjancodes #softwaredesign #python

DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
2 سال پیش در تاریخ 1401/07/01 منتشر شده است.
46,567 بـار بازدید شده
... بیشتر