Checks if an environment variable is set and not "".
(key)
| 63 | |
| 64 | |
| 65 | def is_env_set(key): |
| 66 | """ |
| 67 | Checks if an environment variable is set and not "". |
| 68 | """ |
| 69 | return bool(os.environ.get(key, None)) |
| 70 | |
| 71 | |
| 72 | def get_env_if_set(key, default: typing.Any = ""): |