Conversation
|
|
||
| return None | ||
|
|
||
| def from_dict(self, data: Dict[str, Optional[str]], override: bool = False) -> None: |
There was a problem hiding this comment.
Maybe this should be a classmethod
|
How does this code snippet write anything to the .env file? I see no file write operation. People just want to read and write. Don't need to 'dump' just write. Write one, two, or some dict of variables. The library should have an function for users to add to its dict, and a way to write new items to the file. During the process of writing to the file, add the items to the dict. Do not require programmers to first add them to the lib's dict and then explicitly write them to the file. The intuition of the programmer is that this lib has a direct connection to the .env file, so they shouldn't even know that you have a dict in memory. main API calls: special use functions: I would like to use the .env variable to store settings from a user, since the programmer can provide an API key, or the user can provide an API key. I suppose this isn't the usual way to do things, but this is simpler for me than creating files in The user folder or AppData. |
fixes #502