Currently, with the following code:
from environs import Env
env = Env()
var1 = env("VAR1")
var2 = env("VAR2")
If both env vars are missing, environs will simply display:
environs.EnvError: Environment variable "VAR1" not set
And only when that's set will it display the second error.
It'd be great to have it validate as far as possible all the required environment variables, perhaps with a manual flagging of when to start and stop such a process:
from environs import Env
env = Env(eager=False)
var1 = env("VAR1")
var2 = env("VAR2")
var3 = env.int("VAR3")
env.read()
environs.EnvError: Environment variables invalid: {"VAR1": "missing", "VAR2": "missing", "VAR3": "wrong type"].
Currently, with the following code:
If both env vars are missing, environs will simply display:
And only when that's set will it display the second error.
It'd be great to have it validate as far as possible all the required environment variables, perhaps with a manual flagging of when to start and stop such a process: