django - 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)
解决方案
推荐阅读
- javascript - componentDidMount/Update 中 socket.io 函数上的 setInterval?
- python - Python:如何从字典中获取值并返回对其数学产品的真/假评估?
- bash - 尽管采购,但无法从 bash 脚本更改目录
- regex - 为什么 Golang 中的这个正则表达式是非贪婪的?
- ruby-on-rails - 转义 erb 标记中的字符串插值
- python - 如何使用新函数的参数检查特定键是否在字典中?
- python - Python中嵌套函数的内存地址
- python - Django 3.0.7 无法更改 STATIC_ROOT 路径
- angular - 如何在agGrid中的页面更改或列排序后保留cellStyle更改
- python - 尝试在运行 Ubuntu 的虚拟机上访问 Django 应用程序中的自定义环境变量时出现关键错误