aws ssm参数存储客户机,该客户机从分层路径构造嵌套字典
aws-parameter-store的Python项目详细描述
AWS参数存储
aws ssm parameter store client,它从分层路径构造嵌套字典
功能
- 按路径获取参数
- 自动收集所有分页结果
- 重量轻
安装
安装时使用pip
:
pip install aws-parameter-store
开始
导入模块并创建AwsParameterStore
的新实例。
fromaws_parameter_storeimportAwsParameterStorestore=AwsParameterStore('us-east-1')
API
概述
默认情况下
- 正在计算json参数
- 参数被解密
示例
给定参数:
Name | Value |
---|---|
key-a | wrong |
example/key-b | flat |
example/key-c | secret |
example/path1/path2/key-d | deep |
ret=store.get_parameters_dict('/example/')assertret=={'key-b':'flat','key-c':'secret','path1':{'path2':{'key-d':'deep'}}}
要求
- Python3.6+
贡献
欢迎您加入我们的家庭并参与我们的活动=)
测试
这个项目测试使用pytest。只需运行pytest
许可证
请参阅LICENSE文件以了解许可证权限和限制(apache许可证,版本2.0)