I would like to parse environment variables from a string. For example:
envs = parse_env('name="John Doe" age=21 gender=male') print(envs) # outputs: {"name": "John Doe", "age": 21, "gender": "male"} What is the best and most minimalistic way to achieve this? Thank you.
https://stackoverflow.com/questions/65929884/python-parse-string-environment-variables January 28, 2021 at 09:46AM
没有评论:
发表评论