🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 106 (from laksa081)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
22 hours ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.askpython.com/python-modules/absolute-vs-relative-importing
Last Crawled2026-04-12 05:05:29 (22 hours ago)
First Indexed2021-05-19 17:57:10 (4 years ago)
HTTP Status Code200
Meta TitleAbsolute vs Relative Importing In Python - AskPython
Meta DescriptionHello fellow learner! Today we are going to learn about the differences between Absolute vs Relative Importing in Python.
Meta Canonicalnull
Boilerpipe Text
Hello fellow learner! Today we are going to learn about the differences between Absolute vs Relative Importing in Python. Every time you need a direct function to implement anything in our program we can directly import it from the right library! Now let’s learn about Absolute and Relative Importing in Python programming. What is Absolute Importing? When we import modules through absolute importing, we need to include the full path of the module after the import keyword . The complete path includes the main module/library along with the submodules or functions to be used in the program. Advantages of Absolute Importing This approach is clear, straightforward and easy to understand The absolute import commands remain valid even if the current location of the import statement is changed later. Disadvantages of Absolute Importing Let us suppose, we have to import a function that is present at a deeper layer in the root module. The absolute import command for such module will look something like this: from package_1.sub_package_1.sub_package2.sub_package3.module1 import req_function If the required function is present even deeper in the layers then it’s gonna get really messy and complicated. That’s when the Relative Importing comes to the rescue! What is Relative Importing? In relative approach, we can import a function relative to a certain package or sub package’s location which makes it a better way of importing modules and functions. We have two types of relative importing approaches namely implicit and explicit approach but the implicit approach doesn’t support with Python3.x versions anymore. The relative importing approach is illustrated below: from .sub_package_x.module_5 import req_function The initial . takes into consideration all the previous host modules/libraries and we don’t need to write the whole thing like absolute importing. Advantages of Relative Importing The import statements are short and crisp. Reduces the complexity of the import statement Disadvantages of Relative Importing This approach is not very readable and the programmer is unaware of many root modules. The programmer is unaware of the origin of the function we are importing Now you know the basic differences between absolute vs relative importing approaches. I would recommend you to go for absolute approach as a beginner and as you advance your coding experience you can start using relative approach.
Markdown
[Skip to content](https://www.askpython.com/python-modules/absolute-vs-relative-importing#main) - [About AskPython](https://www.askpython.com/about) - [Blog](https://www.askpython.com/blog) - [Contact Me](https://www.askpython.com/contact-me) - [Free Online Developer Tools Hub](https://www.askpython.com/free-online-tools) - [Home](https://www.askpython.com/) - [Meet the Team](https://www.askpython.com/team) - [Privacy Policy](https://www.askpython.com/privacy-policy) - [Python](https://www.askpython.com/python-programming) - [Python Course for Beginners Online FREE](https://www.askpython.com/python-course-for-beginners) - [Python Tutorial – Mega Index](https://www.askpython.com/python-tutorial-index) - [Terms and Conditions](https://www.askpython.com/terms-and-conditions) 🚀 Supercharge your YouTube channel's growth with AI. [Try YTGrowAI Free](https://ytgrowai.com/) × - [Home](https://www.askpython.com/) - [Blog](https://www.askpython.com/blog) - [About AskPython](https://www.askpython.com/about) - [Python Course](https://www.askpython.com/python-course-for-beginners) - [Start Here](https://www.askpython.com/python-programming) Search Menu # Absolute vs Relative Importing In Python - [![Isha Bansal](https://secure.gravatar.com/avatar/2853b4703792d110d59e20aaa0cd7a0b41aa55e504d718fb62532b86e3217dbb?s=50&d=mm&r=g)](https://www.askpython.com/author/isha)[Isha Bansal](https://www.askpython.com/author/isha "Posts by Isha Bansal") - May 19, 2021 - [Python Modules](https://www.askpython.com/python-modules) ![Absolute Vs Relative Importing](https://www.askpython.com/wp-content/uploads/2021/05/Absolute-vs-Relative-Importing-300x150.png) Absolute Vs Relative Importing Hello fellow learner! Today we are going to learn about the differences between Absolute vs Relative Importing in Python. Every time you need a direct function to implement anything in our program we can directly import it from the right library! Now let’s learn about Absolute and Relative Importing in Python programming. ## What is Absolute Importing? When we import modules through absolute importing, we need to include the full path of the module after the [`import` keyword](https://www.askpython.com/python/python-import-statement). The complete path includes the main module/library along with the submodules or functions to be used in the program. ### Advantages of Absolute Importing 1. This approach is clear, straightforward and easy to understand 2. The absolute import commands remain valid even if the current location of the import statement is changed later. ### Disadvantages of Absolute Importing Let us suppose, we have to import a function that is present at a deeper layer in the root module. The absolute import command for such module will look something like this: ``` from package_1.sub_package_1.sub_package2.sub_package3.module1 import req_function ``` If the required function is present even deeper in the layers then it’s gonna get really messy and complicated. That’s when the Relative Importing comes to the rescue\! ## What is Relative Importing? In relative approach, we can import a function relative to a certain package or sub package’s location which makes it a better way of importing modules and functions. We have two types of relative importing approaches namely `implicit` and `explicit` approach but the implicit approach doesn’t support with Python3.x versions anymore. The relative importing approach is illustrated below: ``` from .sub_package_x.module_5 import req_function ``` The initial `.` takes into consideration all the previous host modules/libraries and we don’t need to write the whole thing like absolute importing. ### Advantages of Relative Importing 1. The import statements are short and crisp. 2. Reduces the complexity of the import statement ### Disadvantages of Relative Importing 1. This approach is not very readable and the programmer is unaware of many root modules. 2. The programmer is unaware of the origin of the function we are importing ## Conclusion – Absolute vs Relative Importing Now you know the basic differences between absolute vs relative importing approaches. I would recommend you to go for absolute approach as a beginner and as you advance your coding experience you can start using relative approach. [![Isha Bansal](https://secure.gravatar.com/avatar/2853b4703792d110d59e20aaa0cd7a0b41aa55e504d718fb62532b86e3217dbb?s=120&d=mm&r=g)](https://www.askpython.com/author/isha) ##### Isha Bansal Hey there stranger\! Do check out my blogs if you are a keen learner\! Hope you like them\! [Articles: 187](https://www.askpython.com/author/isha) [![How To Save And Load Your Deep Learning Models In TensorFlow 2](https://www.askpython.com/wp-content/uploads/2021/05/How-to-save-and-load-your-Deep-Learning-models-in-TensorFlow-2-300x150.png) Previous Post Saving and Loading Models Using TensorFlow 2.0+](https://www.askpython.com/python-modules/saving-loading-models-tensorflow) [Next Post Tkinter Alarm Clock - A Step-By-Step Guide ![Tkinter Alarm Clock](https://www.askpython.com/wp-content/uploads/2021/05/Tkinter-Alarm-Clock-300x150.png)](https://www.askpython.com/python-modules/tkinter/tkinter-alarm-clock) #### Related Posts [![Featured Image For: Scipy Fft: Fast Fourier Transform For Signal Analysis](https://www.askpython.com/wp-content/uploads/2025/09/scipy_fft__Fast_Fourier_Transform_for_Si_1758635125-768x403.png)](https://www.askpython.com/python-modules/scipy/scipy-fft) #### [scipy.fft: Fast Fourier Transform for Signal Analysis](https://www.askpython.com/python-modules/scipy/scipy-fft) - February 11, 2026 [![PYTHON DATETIME MODULE](https://www.askpython.com/wp-content/uploads/2020/07/PYTHON-DATETIME-MODULE-768x384.png)](https://www.askpython.com/python-modules/python-datetime-module) #### [Python datetime module guide](https://www.askpython.com/python-modules/python-datetime-module) - January 25, 2026 [![Featured Image For: Pandas Groupby: Split, Aggregate, And Transform Data With Python](https://www.askpython.com/wp-content/uploads/2026/01/Pandas_groupby__Split__aggregate__and_tr_1769352929-768x403.png)](https://www.askpython.com/python-modules/pandas/pandas-groupby-function) #### [Pandas groupby: Split, aggregate, and transform data with Python](https://www.askpython.com/python-modules/pandas/pandas-groupby-function) - January 25, 2026 ### Partner Websites - [GoLangDocs](https://golangdocs.com/) - [LinuxForDevices](https://www.linuxfordevices.com/) - [CodeForGeek](https://codeforgeek.com/) ### Popular Categories - [Python Programming](https://www.askpython.com/python) - [Python Modules](https://www.askpython.com/python-modules) - [OOPS in Python](https://www.askpython.com/python/oops) - [Python Programming Examples](https://www.askpython.com/python/examples) - [Strings in Python](https://www.askpython.com/python/string) ### Hall of Fame - [Python Programming](https://www.askpython.com/python-programming) - [OOPS in Python](https://www.askpython.com/python/oops/object-oriented-programming-python) - [Creating a Python Module](https://www.askpython.com/python-modules/creating-a-python-module) - [\*args and \*\*kwargs in Python](https://www.askpython.com/python/args-kwargs-in-python) - [Python Dictionary (Dict) Tutorial](https://www.askpython.com/python/dictionary/python-dictionary-dict-tutorial) - [Python List – 15 Things You MUST Know](https://www.askpython.com/python/list/python-list) - [Python Set – Things You MUST Know](https://www.askpython.com/python/set/python-set) - [Python String Functions](https://www.askpython.com/python/string/python-string-functions) ### Important Links - [Home](https://www.askpython.com/) - [Python Course](https://www.askpython.com/python-course-for-beginners) - [Start Here](https://www.askpython.com/python-programming) - [Blog](https://www.askpython.com/blog) - [About AskPython](https://www.askpython.com/about) ###### Latest posts - [How Do UI/UX Design Services Validate Product-Market Fit?](https://www.askpython.com/resources/ui-ux-design-services-validate-product-market-fit) - [Introduction To Cryptocurrency Trading With Python](https://www.askpython.com/resources/introduction-to-cryptocurrency-trading-with-python) - [Automating Screenshot Generation for Web Applications in Python](https://www.askpython.com/resources/automating-screenshot-generation-for-web-applications-in-python) - [scipy.fft: Fast Fourier Transform for Signal Analysis](https://www.askpython.com/python-modules/scipy/scipy-fft) - [Use of Programming in Poker](https://www.askpython.com/resources/use-of-programming-in-poker) Copyright © 2026 - AskPython. All rights reserved.
Readable Markdown
Hello fellow learner! Today we are going to learn about the differences between Absolute vs Relative Importing in Python. Every time you need a direct function to implement anything in our program we can directly import it from the right library! Now let’s learn about Absolute and Relative Importing in Python programming. ## What is Absolute Importing? When we import modules through absolute importing, we need to include the full path of the module after the [`import` keyword](https://www.askpython.com/python/python-import-statement). The complete path includes the main module/library along with the submodules or functions to be used in the program. ### Advantages of Absolute Importing 1. This approach is clear, straightforward and easy to understand 2. The absolute import commands remain valid even if the current location of the import statement is changed later. ### Disadvantages of Absolute Importing Let us suppose, we have to import a function that is present at a deeper layer in the root module. The absolute import command for such module will look something like this: ``` from package_1.sub_package_1.sub_package2.sub_package3.module1 import req_function ``` If the required function is present even deeper in the layers then it’s gonna get really messy and complicated. That’s when the Relative Importing comes to the rescue\! ## What is Relative Importing? In relative approach, we can import a function relative to a certain package or sub package’s location which makes it a better way of importing modules and functions. We have two types of relative importing approaches namely `implicit` and `explicit` approach but the implicit approach doesn’t support with Python3.x versions anymore. The relative importing approach is illustrated below: ``` from .sub_package_x.module_5 import req_function ``` The initial `.` takes into consideration all the previous host modules/libraries and we don’t need to write the whole thing like absolute importing. ### Advantages of Relative Importing 1. The import statements are short and crisp. 2. Reduces the complexity of the import statement ### Disadvantages of Relative Importing 1. This approach is not very readable and the programmer is unaware of many root modules. 2. The programmer is unaware of the origin of the function we are importing Now you know the basic differences between absolute vs relative importing approaches. I would recommend you to go for absolute approach as a beginner and as you advance your coding experience you can start using relative approach.
Shard106 (laksa)
Root Hash16638038953198908706
Unparsed URLcom,askpython!www,/python-modules/absolute-vs-relative-importing s443