Ashraf Miah
May 16, 2022

--

Importing of the `os` module can be avoided by loading the contents of the `.env` file into a dictionary using the `dotenv_values` function.

It also eliminates another line if your loading the environment variable into a python one

--

--

Ashraf Miah

CTO, Data Scientist & Chartered Engineer (MEng CEng EUR ING MRAeS) with over 20 years experience in the Aerospace, Rail & Energy Industry.