AWS boto和boto3有什么区别[关闭]

问题:AWS boto和boto3有什么区别[关闭]

我是使用Python的AWS新手,并且正在尝试学习boto API,但是我注意到有两个主要的Python版本/软件包。那将是boto和boto3。

AWS boto库和boto3库之间有什么区别?

I’m new to AWS using Python and I’m trying to learn the boto API however I noticed that there are two major versions/packages for Python. That would be boto and boto3.

What is the difference between the AWS boto and boto3 libraries?


回答 0

博托包是手工编写Python库自2006年以来即一直围绕这是非常流行,并通过AWS是完全支持,但因为它是手工编码,有这么多的服务(有更多的出现所有的时间),它很难维护。

因此,boto3是基于botocore的boto库的新版本。AWS的所有低级接口均由JSON服务描述驱动,而JSON服务描述是根据服务的规范描述自动生成的。因此,界面始终正确且始终是最新的。客户端层之上有一个资源层,它提供了一个更好的,更具Pythonic的界面。

AWS正在积极开发boto3库,如果人们开始新的开发,我会建议他使用它。

The boto package is the hand-coded Python library that has been around since 2006. It is very popular and is fully supported by AWS but because it is hand-coded and there are so many services available (with more appearing all the time) it is difficult to maintain.

So, boto3 is a new version of the boto library based on botocore. All of the low-level interfaces to AWS are driven from JSON service descriptions that are generated automatically from the canonical descriptions of the services. So, the interfaces are always correct and always up to date. There is a resource layer on top of the client-layer that provides a nicer, more Pythonic interface.

The boto3 library is being actively developed by AWS and is the one I would recommend people use if they are starting new development.