使BOTO3适合粘贴
boto3_paste的Python项目详细描述
用于boto3.session.Session()
的实用程序安装
来自PYPI:
pip install boto3_paste
来源:
$ pip install .
如何使用
如果您使用pyramid:
import boto3_paste def main(global_config, **settings): boto_session = boto3_paste.session_from_config(settings) config = Configurator(settings=settings) # Some your configuration return config.make_wsgi_app()
配置键
请参阅boto3.session.Session和botocore.session.Session的文档。
INI文件示例:
boto3.aws_access_key_id = boto3.aws_secret_access_key = boto3.aws_session_token = boto3.region_name = boto3.profile_name = boto3.botocore.profile = boto3.botocore.region = boto3.botocore.data_path = boto3.botocore.config_file = ~/.aws/config boto3.botocore.ca_bunfle = boto3.botocore.credentials_file = ~/.aws/credentials boto3.botocore.metadata_service_timeout = 1 boto3.botocore.metadata_service_num_attempts = 1
并非所有密钥都是必需的。 如果不写任何键,boto3.session.Session实例是 由default创建。
更改历史记录
0.1-2016-04-05
- 初次发布。