MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / dict

Method dict

src/dotenv/main.py:75–89  ·  view source on GitHub ↗

Return dotenv as dict

(self)

Source from the content-addressed store, hash-verified

73 yield io.StringIO("")
74
75 def dict(self) -> Dict[str, Optional[str]]:
76 """Return dotenv as dict"""
77 if self._dict:
78 return self._dict
79
80 raw_values = self.parse()
81
82 if self.interpolate:
83 self._dict = OrderedDict(
84 resolve_variables(raw_values, override=self.override)
85 )
86 else:
87 self._dict = OrderedDict(raw_values)
88
89 return self._dict
90
91 def parse(self) -> Iterator[Tuple[str, Optional[str]]]:
92 with self._get_stream() as stream:

Callers 8

getMethod · 0.95
dotenv_valuesFunction · 0.80
test_load_dotenv_enabledFunction · 0.80

Calls 2

parseMethod · 0.95
resolve_variablesFunction · 0.85