当前位置: 首页 > 软件库 > 云计算 > >

boto3

AWS SDK for Python
授权协议 Apache-2.0 License
开发语言 Python
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 濮佑运
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Boto3 - The AWS SDK for Python

Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) forPython, which allows Python developers to write software that makes useof services like Amazon S3 and Amazon EC2. You can find the latest, mostup to date, documentation at our doc site, including a list ofservices that are supported.

On 01/15/2021 deprecation for Python 2.7 was announced and support was droppedon 07/15/2021. To avoid disruption, customers using Boto3 on Python 2.7 mayneed to upgrade their version of Python or pin the version of Boto3. Formore information, see this blog post.

Getting Started

Assuming that you have Python and virtualenv installed, set up your environment and install the required dependencies like this or you can install the library using pip:

$ git clone https://github.com/boto/boto3.git
$ cd boto3
$ virtualenv venv
...
$ . venv/bin/activate
$ python -m pip install -r requirements.txt
$ python -m pip install -e .
$ python -m pip install boto3

Using Boto3

After installing boto3

Next, set up credentials (in e.g. ~/.aws/credentials):

[default]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET

Then, set up a default region (in e.g. ~/.aws/config):

[default]
region=us-east-1

Other credentials configuration method can be found here

Then, from a Python interpreter:

>>> import boto3
>>> s3 = boto3.resource('s3')
>>> for bucket in s3.buckets.all():
        print(bucket.name)

Running Tests

You can run tests in all supported Python versions using tox. By default,it will run all of the unit and functional tests, but you can also specify your ownpytest options. Note that this requires that you have all supportedversions of Python installed, otherwise you must pass -e or run thepytest command directly:

$ tox
$ tox -- unit/test_session.py
$ tox -e py26,py33 -- integration/

You can also run individual tests with your default Python version:

$ pytest tests/unit

Getting Help

We use GitHub issues for tracking bugs and feature requests and have limitedbandwidth to address them. Please use these community resources for gettinghelp:

Contributing

We value feedback and contributions from our community. Whether it's a bug report, new feature, correction, or additional documentation, we welcome your issues and pull requests. Please read through this CONTRIBUTING document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your contribution.

Maintenance and Support for SDK Major Versions

Boto3 was made generally available on 06/22/2015 and is currently in the full support phase of the availability life cycle.

For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:

More Resources

  • boto3 中 Client,Resource和Session的不同。 boto3 英文官方文档链接 https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html Resource 是 Amazon Web Services(AWS)的面向对象的接口。 与 Client 进行的原始低级调用相比,它们提供了面

  • aws是Amazon Web Service的简写,它包括众多服务,其中最有名的两个是EC2和S3。 S3是Simple Storage Service的简写,它是一种对象存储的实现。 安装和配置 安装boto3和awscli:pip install boto3 awscli 配置aws:aws configure 根据提示输入access_key_id, secret_access_key和 r

  •  目录 1、使用介绍 1.1 下载文件 代码示例: 传输配置 修改multipart阈值 代码示例: 设置并发数 代码示例: 设置并发的实现方式 代码示例: 1.2 静态服务 将一个Bucket作为一个静态服务 获取: 设置: 删除: 查询: 上篇地址: 【AWS系列】boto3入门-上篇 下面继续介绍boto3的使用 1、使用介绍 1.1 下载文件 下载文件和上传文件是对称的 Client、Bu

  • 一、需求背景 我收到的需求是首先用pyspark将hive数据导出,然后在服务器进行机器学习计算,结果再返回hive仓库,之前一直使用mysql作为中转,实际发现hive数据太大,转到mysql的ETL部分是单线程的很慢,遂改用AWS的s3作为中转,记录常用的操作 Boto3有两种API,低级和高级 低级API:是和AWS的HTTP接口一一对应的,通过boto3.client(“xx”)暴露; 高

  • 1. list_objects(**kwargs) 定义: 返回存储桶中的部分或全部对象(最多 1,000 个)。 可以使用请求参数作为选择标准来返回存储桶中对象的子集。 200 OK 响应可以包含有效或无效的 XML。 请求语法: response = client.list_objects( Bucket='string', Delimiter='string', En

  • import boto3 from botocore.exceptions import ClientError import yaml class My_S3(): def __init__(self, s3_endpoint, s3_access_key, s3_secret_key): self.s3_endpoint = s3_endpoint

相关阅读

相关文章

相关问答

相关文档