Docker Secrets Aware替代os.getenv和os.environ
get-secret-or-env-var的Python项目详细描述
#获取秘密或环境变量
[![圆圈](https://img.shields.io/circleci/build/gh/greenape/get_secret_or_env_var.svg?logo=CircleCI&style=flat-square)](https://circleci.com/gh/greenape/get_secret_or_env_var)[![codecov](https://img.shields.io/codecov/c/github/greenape/get_secret_or_env_var.svg?logo=Codecov&style=flat-square)](https://codecov.io/gh/greenape/get_secret_or_env_var)[![许可证:mit](https://img.shields.io/github/license/greenape/get_secret_or_env_var.svg?style=flat-square)](https://opensource.org/licenses/MIT)[![代码样式:黑色](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/python/black)
用于python的os.getenv和os.environ的Docker机密感知包装器。
用品:
- getenv
- getenvb
- 环境
- 环境
它们的行为与stdlib的等价物完全相同,但会在/run/secrets中查找文件并返回优先于任何环境变量的内容。
设置environ或environb上的值将设置其操作系统中的值。等效值。