Right now it looks like most of the methods to define a file path take a Union[str, TextIO] type. It would be nice if it were possible to pass a pathlib.Path type as well:
from pathlib import Path
root = Path(__file__).parent
cfg = config_from_dotenv(root / '.env', read_from_file=true)
Right now, when I try to do so, I get the following error:
File "/path/to/.venv/lib/python3.11/site-packages/config/__init__.py", line 579, in _reload
data = data.read()
^^^^^^^^^
There might have to be some introspection of the data object, or a conversion of the str to a Path.