本文整理汇总了Python中azure.storage.Entity.Birthday方法的典型用法代码示例。如果您正苦于以下问题:Python Entity.Birthday方法的具体用法?Python Entity.Birthday怎么用?Python Entity.Birthday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类azure.storage.Entity
的用法示例。
在下文中一共展示了Entity.Birthday方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sanity_insert_entity
# 需要导入模块: from azure.storage import Entity [as 别名]
# 或者: from azure.storage.Entity import Birthday [as 别名]
def sanity_insert_entity(self):
resp = self.tc.insert_entity(TABLE_NO_DELETE, {'PartitionKey':'Lastname',
'RowKey':'Firstname',
'age':39,
'sex':'male',
'birthday':datetime(1973,10,04)})
self.assertEquals(resp, None)
entity = Entity()
entity.PartitionKey = 'Lastname'
entity.RowKey = 'Firstname1'
entity.age = 39
entity.Birthday = EntityProperty('Edm.Int64', 20)
resp = self.tc.insert_entity(TABLE_NO_DELETE, entity)
self.assertEquals(resp, None)
示例2: _create_default_entity_class
# 需要导入模块: from azure.storage import Entity [as 别名]
# 或者: from azure.storage.Entity import Birthday [as 别名]
def _create_default_entity_class(self, partition, row):
'''
Creates a class-based entity with fixed values, using all
of the supported data types.
'''
entity = Entity()
entity.PartitionKey = partition
entity.RowKey = row
entity.age = 39
entity.sex = 'male'
entity.married = True
entity.deceased = False
entity.optional = None
entity.ratio = 3.1
entity.large = 9333111000
entity.Birthday = datetime(1973, 10, 4)
entity.birthday = datetime(1970, 10, 4)
entity.binary = None
entity.other = EntityProperty('Edm.Int64', 20)
entity.clsid = EntityProperty(
'Edm.Guid', 'c9da6455-213d-42c9-9a79-3e9149a57833')
return entity