I'm trying to substitute environment variables list of yaml object in python. The format of yaml file being:
environment:
- blocHost=bloc:8000
- EXT_STORAGE_S3_BUCKET=${EXT_STORAGE_S3_BUCKET}
- EXT_STORAGE_S3_ACCESS_KEY_ID=${EXT_STORAGE_S3_ACCESS_KEY_ID}
The env vars loaded by yaml.load()
is a list of strings, which is inconvenient to manipulate.
Is there any solution to load this list as a dictionary?
Thanks!