擅长:python、mysql、java
<p>您可以使用Python GCS API客户端库。有关文档和下载的相关链接,请参见<a href="https://cloud.google.com/storage/docs/json_api/v1/libraries" rel="nofollow">Samples and Libraries for Google Cloud Storage</a>文档页面。</p>
<p>在你的例子中,首先我想指出你混淆了“桶”这个词。我建议阅读文档的<a href="https://cloud.google.com/storage/docs/key-terms" rel="nofollow">Key Terms</a>页。你说的是对象名前缀。</p>
<p>您可以从GitHub上的<a href="https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/storage/api/list_objects.py" rel="nofollow">list-objects.py</a>示例开始。查看<a href="https://developers.google.com/resources/api-libraries/documentation/storage/v1/python/latest/storage_v1.objects.html#list" rel="nofollow">list</a>引用页,您将需要传递<code>prefix=abc/xyz</code>和<code>delimiter=/</code>。</p>