azure.storage.table.models module

exception azure.storage.table.models.AzureBatchOperationError(message, status_code, batch_code)[source]

Bases: azure.common.AzureHttpError

Indicates that a batch operation failed.

Variables:
  • message (str) – A detailed error message indicating the index of the batch request which failed and the reason for the failure. For example, ‘0:One of the request inputs is out of range.’ indicates the 0th batch request failed as one of its property values was out of range.
  • status_code (int) – The HTTP status code of the batch request. For example, 400.
  • batch_code (str) – The batch status code. For example, ‘OutOfRangeInput’.
exception azure.storage.table.models.AzureBatchValidationError[source]

Bases: azure.common.AzureException

Indicates that a batch operation cannot proceed due to invalid input.

Variables:message (str) – A detailed error message indicating the reason for the failure.
class azure.storage.table.models.EdmType[source]

Bases: object

Used by EntityProperty to represent the type of the entity property to be stored by the Table service.

BINARY = 'Edm.Binary'

Represents byte data. Must be specified.

BOOLEAN = 'Edm.Boolean'

Represents a boolean. This type will be inferred for Python bools.

DATETIME = 'Edm.DateTime'

Represents a date. This type will be inferred for Python datetime objects.

DOUBLE = 'Edm.Double'

Represents a double. This type will be inferred for Python floating point numbers.

GUID = 'Edm.Guid'

Represents a GUID. Must be specified.

INT32 = 'Edm.Int32'

Represents a number between -(2^15) and 2^15. Must be specified or numbers will default to INT64.

INT64 = 'Edm.Int64'

Represents a number between -(2^31) and 2^31. This is the default type for Python numbers.

STRING = 'Edm.String'

Represents a string. This type will be inferred for Python strings.

class azure.storage.table.models.Entity[source]

Bases: dict

An entity object. Can be accessed as a dict or as an obj. The attributes of the entity will be created dynamically. For example, the following are both valid:

entity = Entity()
entity.a = 'b'
entity['x'] = 'y'
class azure.storage.table.models.EntityProperty(type=None, value=None, encrypt=False)[source]

Bases: object

An entity property. Used to explicitly set EdmType when necessary.

Values which require explicit typing are GUID, INT32, and BINARY. Other EdmTypes may be explicitly create as EntityProperty objects but need not be. For example, the below with both create STRING typed properties on the entity:

entity = Entity()
entity.a = 'b'
entity.x = EntityProperty(EdmType.STRING, 'y')

Represents an Azure Table. Returned by list_tables.

Parameters:
  • type (str) – The type of the property.
  • value (EdmType) – The value of the property.
  • encrypt (bool) – Indicates whether or not the property should be encrypted.
class azure.storage.table.models.Table[source]

Bases: object

Represents an Azure Table. Returned by list_tables.

Variables:name (str) – The name of the table.
class azure.storage.table.models.TablePayloadFormat[source]

Bases: object

Specifies the accepted content type of the response payload. More information can be found here: https://msdn.microsoft.com/en-us/library/azure/dn535600.aspx

JSON_FULL_METADATA = 'application/json;odata=fullmetadata'

Returns minimal type information for the entity properties plus some extra odata properties.

JSON_MINIMAL_METADATA = 'application/json;odata=minimalmetadata'

Returns minimal type information for the entity properties.

JSON_NO_METADATA = 'application/json;odata=nometadata'

Returns no type information for the entity properties.

class azure.storage.table.models.TablePermissions(query=False, add=False, update=False, delete=False, _str=None)[source]

Bases: object

TablePermissions class to be used with the generate_table_shared_access_signature() method and for the AccessPolicies used with set_table_acl().

Variables:
Parameters:
  • query (bool) – Get entities and query entities.
  • add (bool) – Add entities. Add and Update permissions are required for upsert operations.
  • update (bool) – Update entities. Add and Update permissions are required for upsert operations.
  • delete (bool) – Delete entities.
  • _str (str) – A string representing the permissions.
ADD = <azure.storage.table.models.TablePermissions object>
DELETE = <azure.storage.table.models.TablePermissions object>
QUERY = <azure.storage.table.models.TablePermissions object>
UPDATE = <azure.storage.table.models.TablePermissions object>