Im trying to get my envvars in a file in the same part as the python file that im using for the correct credentials but im having an error and its that at the moment I use the config option always has the default value and doesnt find my .env file. Below an example of code:
import decouple as dc
asset = {
"db_username": str(dc.config("DB_USERNAME_1")),
"db_password": str(dc.config("DB_PASSWORD_1", default=None)),
"db_name": str(dc.config("DB_1", default=None))
}
and printing the dictionary I receive the next values:
Of course should be printed the values stored in my .env file but always get the default value, i didnt change anything and before was working as expected but now is broken. I need to add that the .env file is in the same level as my python script.
Im trying to get my envvars in a file in the same part as the python file that im using for the correct credentials but im having an error and its that at the moment I use the config option always has the default value and doesnt find my .env file. Below an example of code:
and printing the dictionary I receive the next values:
Of course should be printed the values stored in my .env file but always get the default value, i didnt change anything and before was working as expected but now is broken. I need to add that the .env file is in the same level as my python script.
Thank you for your support.