Python Custom Config Files for Modules

I have below Directory Structure:
|-- firstFolder
|-- |--
|-- |-- configFile
|-- SecondFolder
|-- |--
|-- |-- configFile

I have many folders like (firstFolder, secondFolder...) and all their python files have same type of code only difference is on processing the variables from config file. I have put all the common code in file and the variable processing has been kept in,m files as a function.

What I want to do is: I will run the file and depending on some input/signal I will call the fucntion from, .. file and I want them to be run with their own config file variables.

I am using below code format:


import os
import configparser
config = configparser.ConfigParser(),'config'))
var1 = config['xyz']['abc']
var2 = config['jkl']['mno']

def doSomeMagic(INPUT_VAR):
    someProcessing_on var1, var2 & INPUT_VAR

Importing the modules in

from firstFolder import first
from secondFolder import second

initialization_of INPUT_VAR

if SIGNAl == 1:

Depending on some input/signal, I will call doSomeMagic function from, ... files. I want these function to use their config file but Config files are not accessible when I am following this format/structure.

Any help on how to Achieve this and any advice to change these formats/stucture to make more Pythonic way.

I have some folder with name starting with a digit like: 7Yes

from 7Yes import 7yes

How can I import the python file from this directory?