本文整理汇总了Python中gcloud.storage.bucket.Bucket._properties方法的典型用法代码示例。如果您正苦于以下问题:Python Bucket._properties方法的具体用法?Python Bucket._properties怎么用?Python Bucket._properties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcloud.storage.bucket.Bucket
的用法示例。
在下文中一共展示了Bucket._properties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _makeOne
# 需要导入模块: from gcloud.storage.bucket import Bucket [as 别名]
# 或者: from gcloud.storage.bucket.Bucket import _properties [as 别名]
def _makeOne(self, client=None, name=None, properties=None):
from gcloud.storage.bucket import Bucket
if client is None:
connection = _Connection()
client = _Client(connection)
bucket = Bucket(client, name=name)
bucket._properties = properties or {}
return bucket
示例2: get_items_from_response
# 需要导入模块: from gcloud.storage.bucket import Bucket [as 别名]
# 或者: from gcloud.storage.bucket.Bucket import _properties [as 别名]
def get_items_from_response(self, response):
"""Factory method which yields :class:`.Bucket` items from a response.
:type response: dict
:param response: The JSON API response for a page of buckets.
"""
for item in response.get('items', []):
name = item.get('name')
bucket = Bucket(name, connection=self.connection)
bucket._properties = item
yield bucket
示例3: _makeOne
# 需要导入模块: from gcloud.storage.bucket import Bucket [as 别名]
# 或者: from gcloud.storage.bucket.Bucket import _properties [as 别名]
def _makeOne(self, *args, **kw):
from gcloud.storage.bucket import Bucket
properties = kw.pop('properties', None)
bucket = Bucket(*args, **kw)
bucket._properties = properties or {}
return bucket