Looking at the Google Python Style Guide under 3.13 it says order of imports should be:
What exactly is Code repository sub-package imports
? If there is a library written by another team in the company is that Third Party or is it Code Repository?
"Code repository sub-package imports" means a package that lives in the projects' directory.
If you have main.py
and utils.py
, you will do from utils import magic_algorithm
last.
So, following that logic the entire thing might look like
from __future__ import braces # future import
import re # python built-in import
from requests import Session # third-party import
from utils import magic_algorithm # code repository import