The Python import system is pretty straightforward… to a point. Importing code present in the same directory you’re working in is very different from importing between multiple files present in multiple directories. Through this post, I try to analyse the different import scenarios that one might encounter, hopefully making it easier to create your own packages.
An Example
What Happens When You Import a Python File?
Terminology
Import Scenarios
Analysis
Building a Package
The Syntax of Your Import Statement
Notes and Resources
#machine-learning #python #software-development #how imports work in python #imports work #imports