5 Tips To Organize Python Code

preview_player
Показать описание
Welcome back to another video! In this video I am going to be sharing with you 5 tips on how you can better organize your code! Now keep in mind these are not going to be life changing, they are just meant to help make your code much more readable and easier to navigate! They are not going to deal with software design and software architecture, so I hope you enjoy and find this video helpful!

📄 Resources 📄

⭐️ Timestamps ⭐️
00:00 | Introduction
00:26 | #1 - Use Modules and Packages
03:59 | #2 - One Class = One File
05:15 | #3 - Group Related Functionality Together
07:47 | #4 - Separate Utility & Helper Functions
09:26 | #5 - Organize Imports

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
-Tech With Tim
-5 Tips to Organize Your Code
-Organize Your Code
-How to Organize Code
-Python Code Organization

⭐️ Hashtags ⭐️
#TechWithTim #TipsToOrganizeCode
Рекомендации по теме
Комментарии
Автор

I have outgrown the difficulty of what you teach but i still come back time to time because your content is what taught me most of what i know

wannabedev
Автор

The correct order for pep compliance is (see style guide 'Imports'):
1: Standard library imports.
2: Related third party imports.
3: Local application/library specific imports.

Richard_GIS
Автор

Wow, this is exactly what i was searching for when improving in coding but didn't learn it from scratch just somewhere in between. Thank you so much!

simoneisenschink
Автор

It's not __init__.py that makes a package. It's even not required anymore in Python 3.x. It's just having a folder. Basically, package = folder and module = file.

ppolleunus
Автор

Just starting my journey here and I am enjoying this content from over the years. Great stuff Tim

omlette
Автор

About organize imports, pep8 recommend use 1. standard library imports
, 2. related third party imports, 3. local application/library specific imports . Anyway great video Thanks!

vndrBy
Автор

1) use module and package: module is individual python file, package is directory with many python modules; package requires __init__.py - which makes folder the package; whatever is in init, it will be run

2) one class in one file (may be exceptions)

3) group related functionality together

4) separate utility and helper functions

5) organize import statements

sobysonics
Автор

Slowly I start to understand how GitHub Projects work. I must say as a "advanced" beginner who has just finished learning native Python it's pretty intimidating to see such big Projects and not understanding a single thing even though I'm not actually struggling with the Python part but I guess that's a thing you have to get used to :D
Great video Tim, thank you very much ❤

fabianstargalla
Автор

OMG, THIS WAS ACTUALLY SO USEFUL. Thanks a lot, really learned a lot.

eliasebner
Автор

Thank you for creating this video on organizing Python code. It may be useful to others who want to improve the readability and maintainability of their code. Here are the 5 key points of the video.

1. Use modules and packages to better organize Python code.
2. Place each class in an individual file using Pascal case.
3. Group related functionality together in packages.
4. Place all utilities in a single file or package.
5. Organize import statements by third party, built-in, and local files.

zzixfwz
Автор

No words to explain the contents you made! Just Amazing.

futurism
Автор

This vid was exactly what i need to finish my project, thank you so much!

kilocesar
Автор

Every time i see a notification from your channel i feel so happy and excited to learn something new❤️

kirollssabri
Автор

Feels like this guy knows everything I need to know in python

crazycat
Автор

Great video thanks so much! I have been using modules but not local packages thanks!

kosmonautofficial
Автор

Hi Tim! great video, i enjoyed it and now i feel like i can easily take on python

brianrichard
Автор

You can have the import statements auto sorted by using the isort tool, which formats the imports consistently.

Available as a formatter in multiple LSPs.

ToddVanyo
Автор

Nice offer and tips from this video, it has given me a sense of relief.

elisachin
Автор

Great content, totally agree on pretty much everything.
For Utils I would add a little thing: I usually recommend not to do it cause 1. junior dev would over use it and 2. It doesn’t help to know what’s inside. So for me, it is on very last option.

sylvainprive
Автор

Because of this guy, I learned how to organize my code 👌

shingaling