Load the current dotenv as system environment variable.
(self)
| 95 | yield mapping.key, mapping.value |
| 96 | |
| 97 | def set_as_environment_variables(self) -> bool: |
| 98 | """ |
| 99 | Load the current dotenv as system environment variable. |
| 100 | """ |
| 101 | if not self.dict(): |
| 102 | return False |
| 103 | |
| 104 | for k, v in self.dict().items(): |
| 105 | if k in os.environ and not self.override: |
| 106 | continue |
| 107 | if v is not None: |
| 108 | os.environ[k] = v |
| 109 | |
| 110 | return True |
| 111 | |
| 112 | def get(self, key: str) -> Optional[str]: |
| 113 | """ """ |