Python Imports 101

Mahdi Yusuf

Mahdi Yusuf 5 Lessons 14m
basics python

Your introduction to Python’s imports. We will touch on what actually happens when an import is called various ways of importing modules, touching on implicit relative imports vs explicit relative imports, and finally tips on how to avoid circular dependencies.

About Mahdi Yusuf

Mahdi Yusuf Mahdi Yusuf

Mahdi is the CTO of Gyroscope, the co-founder of the PyCoder’s Weekly, and a longtime Pythoneer.

» More about Mahdi

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

cyberladysj on Nov. 6, 2019

Thank You Mahdi, this tutorial is excellent! I am still new to python and using python for my Cyber-sec tools. I was trying to import a module and kept getting “‘module’ object has no attibute” and this showed me how to import the module. Thank you again!

« Browse All Courses