首页 > 解决方案 > base64 编码从 .bash_profile 返回 None ,我将其保存为环境变量

问题描述

我将 base64 编码保存为 .bash_profile 中的环境变量

.bash_profile

export ENCODED_JSON="b'Aewe323'"

在 python 脚本中执行以下操作会返回 None

import os
ENCODED_JSON = os.environ.get('ENCODED_JSON')
print(ENCODED_JSON)

标签: djangopython-3.xflaskbase64environment-variables

解决方案


推荐阅读