python-dotenv
python-dotenv copied to clipboard
cannot parse with semicolons
Semicolons ; are valid syntax in .env files but they do not parse when loading with this library. Rather than requiring semicolons to be removed in the config file, would like this library to handle them when present. Below is an example use-case.
production.env
DB_HOST='localhost'; DB_PORT=1234;
DB_NAME='mydatabase';
source code
from dotenv import dotenv_values
cfg = dotenv_values("/path/to/production.env")
error
Python-dotenv could not parse statement starting at line 1
Python-dotenv could not parse statement starting at line 2
@eangius Thanks for reporting, but unless we have more similar request and community in support this logic, I'll have to put this request as out of scope for this library.