简体   繁体   English

便携式应用程序:s3和谷歌云存储

[英]Portable application: s3 and Google cloud storage

I want to write an application which is portable. 我想写一个便携的应用程序。

With "portable" I mean that it can be used to access these storages: 使用“便携式”我的意思是它可用于访问这些存储:

  • amazon s3 亚马逊s3
  • google cloud storage 谷歌云存储
  • Eucalyptus Storage 桉树贮藏

The software should be developed using Python. 该软件应使用Python开发。

I am unsure how to start, since I could not find a library which supports all three storages. 我不确定如何开始,因为我找不到支持所有三个存储的库。

In order to connect to Google Cloud Storage from your application, you can follow the steps described here to learn how to read from a storage bucket or write into one using the application. 要从您的应用程序连接到Google云端存储,您可以按照此处描述的步骤学习如何从存储桶读取或使用该应用程序写入存储桶。 It also includes an example on how to perform those steps. 它还包括一个如何执行这些步骤的示例。

Please be aware that this would only work for Google Cloud Storage. 请注意,这仅适用于Google云端存储。 As for Amazon and Eucalyptus, I would not be able to provide the help you need. 至于亚马逊和桉树,我将无法提供您所需的帮助。

UPDATE UPDATE

After confirming that the answer I posted above is not what you wish for your application, we can start from @GautamKumar's answer and continue from there, so let's check the boto library. 在确认我上面发布的答案不符合您的申请后,我们可以从@ GautamKumar的答案开始,然后从那里继续,让我们检查一下boto库。 As Gautam said, boto3 is useful to connect to Amazon S3 buckets, so let's see if there are also options for Eucalyptus and Google Cloud Storage. 正如Gautam所说, boto3对于连接到Amazon S3存储桶很有用,所以让我们看看是否还有Eucalyptus和Google Cloud Storage的选项。

I could check that the same library can be used to connect to Eucalyptus , including options for both EC2 and S3. 我可以检查是否可以使用相同的库连接到Eucalyptus ,包括EC2和S3的选项。 You can find some examples on how to use boto3 with Eucalyptus in this link . 您可以在此链接中找到有关如何将boto3与Eucalyptus一起使用的boto3

Also, there is a plugin available for accessing Google Cloud Storage and performing operations with their buckets by using the XML API. 此外,还有一个插件可用于访问Google云端存储并使用XML API执行其存储桶操作。 You would also need gcs_oauth2_boto_plugin in order to authenticate into Cloud Storage. 您还需要gcs_oauth2_boto_plugin才能在云存储中进行身份验证。 In the provided link you can check how to perform the different operations to access the Cloud Storage buckets and perform different operations with them. 在提供的链接中,您可以检查如何执行不同的操作来访问云存储桶并使用它们执行不同的操作。

您可以使用boto3访问亚马逊的任何服务。

Since Eucalyptus aims to provide AWS compatible APIs , all you need is a package that is Google and AWS compatible. 由于Eucalyptus旨在提供与AWS兼容的API ,因此您只需要一个与Google兼容的软件包。

A quick search online finds at least a couple of possible answers: 在线快速搜索至少找到几个可能的答案:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM