Load the current dotenv as system environment variable.
(self)
| 85 | yield mapping.key, mapping.value |
| 86 | |
| 87 | def set_as_environment_variables(self) -> bool: |
| 88 | """ |
| 89 | Load the current dotenv as system environment variable. |
| 90 | """ |
| 91 | if not self.dict(): |
| 92 | return False |
| 93 | |
| 94 | for k, v in self.dict().items(): |
| 95 | if k in os.environ and not self.override: |
| 96 | continue |
| 97 | if v is not None: |
| 98 | os.environ[k] = v |
| 99 | |
| 100 | return True |
| 101 | |
| 102 | def get(self, key: str) -> Optional[str]: |
| 103 | """ |