Python Forum
python standard way of importing library
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python standard way of importing library
#1
Hi Team,
What is industrial standard way of importing library ,
my colleague suggested below.

1)standard,
2) third party,
3) local modules

# standard Imports
import os
import re

# Third party Imports
import pandas as pd


# Local Imports
import dbs_main
import connect_sql
Reply
#2
Follow PEP 8

https://peps.python.org/pep-0008/#imports

I use a vscode extension named "isort" to automate the task.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with importing python-telegram library into the project gandonio 1 1,589 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Running Standard Scaler in Python 3 Led_Zeppelin 1 1,287 Sep-05-2022, 06:35 PM
Last Post: deanhystad
  importing a list of numbers into python script barrypyth 8 4,620 Aug-22-2020, 09:10 PM
Last Post: barrypyth
  Importing python data to Textfile or CSV yanDvator 0 1,763 Aug-02-2020, 06:58 AM
Last Post: yanDvator
  importing a CSV file into Python russoj5 1 2,968 Aug-02-2020, 12:03 AM
Last Post: scidam
  Winsorized Mean and Standard Deviation Wheeliam 0 1,829 Jul-11-2020, 05:27 PM
Last Post: Wheeliam
  importing same python library in multiple custom module escape_freedom13 6 3,846 May-10-2020, 07:01 PM
Last Post: escape_freedom13
  standard library modules chpyel 4 2,839 May-10-2020, 02:58 PM
Last Post: snippsat
  importing CSV file into a OOP Class table using Python faruk61 1 2,972 Apr-15-2020, 12:00 PM
Last Post: faruk61
  importing CSV file into a HTML table using Python trybakov 1 2,303 Feb-22-2020, 09:47 PM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020