MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / dict

Method dict

src/dotenv/main.py:67–79  ·  view source on GitHub ↗

Return dotenv as dict

(self)

Source from the content-addressed store, hash-verified

65 yield io.StringIO('')
66
67 def dict(self) -> Dict[str, Optional[str]]:
68 """Return dotenv as dict"""
69 if self._dict:
70 return self._dict
71
72 raw_values = self.parse()
73
74 if self.interpolate:
75 self._dict = OrderedDict(resolve_variables(raw_values, override=self.override))
76 else:
77 self._dict = OrderedDict(raw_values)
78
79 return self._dict
80
81 def parse(self) -> Iterator[Tuple[str, Optional[str]]]:
82 with self._get_stream() as stream:

Callers 4

getMethod · 0.95
dotenv_valuesFunction · 0.80

Calls 2

parseMethod · 0.95
resolve_variablesFunction · 0.85

Tested by 1