azure-storage-blob API Reference
Full documentation for azure-storage-blob (12.30.0)
azure-storage-blob.AccessPolicy
Python Library Documentation: class AccessPolicy in module azure.storage.blob._models
class AccessPolicy(azure.storage.blob._generated.models._models_py3.AccessPolicy)
| AccessPolicy(permission: Union[ForwardRef('ContainerSasPermissions'), str, NoneType] = None, expiry: Union[ForwardRef('datetime'), str, NoneType] = None, start: Union[ForwardRef('datetime'), str, NoneType] = None) -> None
|
| Access Policy class used by the set and get access policy methods in each service.
|
| A stored access policy can specify the start time, expiry time, and
| permissions for the Shared Access Signatures with which it's associated.
| Depending on how you want to control access to your resource, you can
| specify all of these parameters within the stored access policy, and omit
| them from the URL for the Shared Access Signature. Doing so permits you to
| modify the associated signature's behavior at any time, as well as to revoke
| it. Or you can specify one or more of the access policy parameters within
| the stored access policy, and the others on the URL. Finally, you can
| specify all of the parameters on the URL. In this case, you can use the
| stored access policy to revoke the signature, but not to modify its behavior.
|
| Together the Shared Access Signature and the stored access policy must
| include all fields required to authenticate the signature. If any required
| fields are missing, the request will fail. Likewise, if a field is specified
| both in the Shared Access Signature URL and in the stored access policy, the
| request will fail with status code 400 (Bad Request).
|
| :param permission:
| The permissions associated with the shared access signature. The
| user is restricted to operations allowed by the permissions.
| Required unless an id is given referencing a stored access policy
| which contains this field. This field must be omitted if it has been
| specified in an associated stored access policy.
| :type permission: Optional[Union[ContainerSasPermissions, str]]
| :param expiry:
| The time at which the shared access signature becomes invalid.
| Required unless an id is given referencing a stored access policy
| which contains this field. This field must be omitted if it has
| been specified in an associated stored access policy. Azure will always
| convert values to UTC. If a date is passed in without timezone info, it
| is assumed to be UTC.
| :paramtype expiry: Optional[Union[str, datetime]]
| :param start:
| The time at which the shared access signature becomes valid. If
| omitted, start time for this call is assumed to be the time when the
| storage service receives the request. Azure will always convert values
| to UTC. If a date is passed in without timezone info, it is assumed to
| be UTC.
| :paramtype start: Optional[Union[str, datetime]]
|
| Method resolution order:
| AccessPolicy
| azure.storage.blob._generated.models._models_py3.AccessPolicy
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, permission: Union[ForwardRef('ContainerSasPermissions'), str, NoneType] = None, expiry: Union[ForwardRef('datetime'), str, NoneType] = None, start: Union[ForwardRef('datetime'), str, NoneType] = None) -> None
| :keyword start: the date-time the policy is active.
| :paramtype start: str
| :keyword expiry: the date-time the policy expires.
| :paramtype expiry: str
| :keyword permission: the permissions for the acl policy.
| :paramtype permission: str
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'expiry': typing.Union[ForwardRef('datetime'), str,...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.AccountSasPermissions
Python Library Documentation: class AccountSasPermissions in module azure.storage.blob._shared.models
class AccountSasPermissions(builtins.object)
| AccountSasPermissions(read: bool = False, write: bool = False, delete: bool = False, list: bool = False, add: bool = False, create: bool = False, update: bool = False, process: bool = False, delete_previous_version: bool = False, **kwargs) -> None
|
| :class:`~ResourceTypes` class to be used with generate_account_sas
| function and for the AccessPolicies used with set_*_acl. There are two types of
| SAS which may be used to grant resource access. One is to grant access to a
| specific resource (resource-specific). Another is to grant access to the
| entire service for a specific account and allow certain operations based on
| perms found here.
|
| :param bool read:
| Valid for all signed resources types (Service, Container, and Object).
| Permits read permissions to the specified resource type.
| :param bool write:
| Valid for all signed resources types (Service, Container, and Object).
| Permits write permissions to the specified resource type.
| :param bool delete:
| Valid for Container and Object resource types, except for queue messages.
| :param bool delete_previous_version:
| Delete the previous blob version for the versioning enabled storage account.
| :param bool list:
| Valid for Service and Container resource types only.
| :param bool add:
| Valid for the following Object resource types only: queue messages, and append blobs.
| :param bool create:
| Valid for the following Object resource types only: blobs and files.
| Users can create new blobs or files, but may not overwrite existing
| blobs or files.
| :param bool update:
| Valid for the following Object resource types only: queue messages.
| :param bool process:
| Valid for the following Object resource type only: queue messages.
| :keyword bool tag:
| To enable set or get tags on the blobs in the container.
| :keyword bool filter_by_tags:
| To enable get blobs by tags, this should be used together with list permission.
| :keyword bool set_immutability_policy:
| To enable operations related to set/delete immutability policy.
| To get immutability policy, you just need read permission.
| :keyword bool permanent_delete:
| To enable permanent delete on the blob is permitted.
| Valid for Object resource type of Blob only.
|
| Methods defined here:
|
| __init__(self, read: bool = False, write: bool = False, delete: bool = False, list: bool = False, add: bool = False, create: bool = False, update: bool = False, process: bool = False, delete_previous_version: bool = False, **kwargs) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_string(permission)
| Create AccountSasPermissions from a string.
|
| To specify read, write, delete, etc. permissions you need only to
| include the first letter of the word in the string. E.g. for read and write
| permissions you would provide a string "rw".
|
| :param str permission: Specify permissions in
| the string with the first letter of the word.
| :return: An AccountSasPermissions object
| :rtype: ~azure.storage.blob.AccountSasPermissions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'add': <class 'bool'>, 'create': <class 'bool'>, 'd...
|
| add = False
|
| create = False
|
| delete = False
|
| delete_previous_version = False
|
| filter_by_tags = False
|
| list = False
|
| permanent_delete = False
|
| process = False
|
| read = False
|
| set_immutability_policy = False
|
| tag = False
|
| update = False
|
| write = False
azure-storage-blob.Any
Python Library Documentation: class Any in module typing class Any(builtins.object) | Any(*args, **kwargs) | | Special type indicating an unconstrained type. | | - Any is compatible with every type. | - Any assumed to have all methods. | - All values assumed to be instances of Any. | | Note that all the above statements are true from the point of view of | static type checkers. At runtime, Any should not be used with instance | checks. | | Static methods defined here: | | __new__(cls, *args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
azure-storage-blob.AnyStr
Python Library Documentation: TypeVar in module typing object
AnyStr = class TypeVar(builtins.object)
| Type variable.
|
| The preferred way to construct a type variable is via the dedicated
| syntax for generic functions, classes, and type aliases::
|
| class Sequence[T]: # T is a TypeVar
| ...
|
| This syntax can also be used to create bound and constrained type
| variables::
|
| # S is a TypeVar bound to str
| class StrSequence[S: str]:
| ...
|
| # A is a TypeVar constrained to str or bytes
| class StrOrBytesSequence[A: (str, bytes)]:
| ...
|
| However, if desired, reusable type variables can also be constructed
| manually, like so::
|
| T = TypeVar('T') # Can be anything
| S = TypeVar('S', bound=str) # Can be any subtype of str
| A = TypeVar('A', str, bytes) # Must be exactly str or bytes
|
| Type variables exist primarily for the benefit of static type
| checkers. They serve as the parameters for generic types as well
| as for generic function and type alias definitions.
|
| The variance of type variables is inferred by type checkers when they
| are created through the type parameter syntax and when
| ``infer_variance=True`` is passed. Manually created type variables may
| be explicitly marked covariant or contravariant by passing
| ``covariant=True`` or ``contravariant=True``. By default, manually
| created type variables are invariant. See PEP 484 and PEP 695 for more
| details.
|
| Methods defined here:
|
| __mro_entries__(...)
|
| __or__(self, value, /)
| Return self|value.
|
| __reduce__(self, /)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __typing_subst__(self, /, arg)
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __bound__
|
| __constraints__
|
| __contravariant__
|
| __covariant__
|
| __infer_variance__
azure-storage-blob.ArrowDialect
Python Library Documentation: class ArrowDialect in module azure.storage.blob._models
class ArrowDialect(azure.storage.blob._generated.models._models_py3.ArrowField)
| ArrowDialect(type, **kwargs: Any) -> None
|
| field of an arrow schema.
|
| All required parameters must be populated in order to send to Azure.
|
| :param ~azure.storage.blob.ArrowType type: Arrow field type.
| :keyword str name: The name of the field.
| :keyword int precision: The precision of the field.
| :keyword int scale: The scale of the field.
|
| Method resolution order:
| ArrowDialect
| azure.storage.blob._generated.models._models_py3.ArrowField
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, type, **kwargs: Any) -> None
| :keyword type: Required.
| :paramtype type: str
| :keyword name:
| :paramtype name: str
| :keyword precision:
| :paramtype precision: int
| :keyword scale:
| :paramtype scale: int
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.ArrowType
Python Library Documentation: class ArrowType in module azure.storage.blob._models
class ArrowType(builtins.str, enum.Enum)
| ArrowType(*values)
|
| Method resolution order:
| ArrowType
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BOOL = <ArrowType.BOOL: 'bool'>
|
| DECIMAL = <ArrowType.DECIMAL: 'decimal'>
|
| DOUBLE = <ArrowType.DOUBLE: 'double'>
|
| INT64 = <ArrowType.INT64: 'int64'>
|
| STRING = <ArrowType.STRING: 'string'>
|
| TIMESTAMP_MS = <ArrowType.TIMESTAMP_MS: 'timestamp[ms]'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.BlobAnalyticsLogging
Python Library Documentation: class BlobAnalyticsLogging in module azure.storage.blob._models
class BlobAnalyticsLogging(azure.storage.blob._generated.models._models_py3.Logging)
| BlobAnalyticsLogging(**kwargs: Any) -> None
|
| Azure Analytics Logging settings.
|
| :keyword str version:
| The version of Storage Analytics to configure. The default value is 1.0.
| :keyword bool delete:
| Indicates whether all delete requests should be logged. The default value is `False`.
| :keyword bool read:
| Indicates whether all read requests should be logged. The default value is `False`.
| :keyword bool write:
| Indicates whether all write requests should be logged. The default value is `False`.
| :keyword ~azure.storage.blob.RetentionPolicy retention_policy:
| Determines how long the associated data should persist. If not specified the retention
| policy will be disabled by default.
|
| Method resolution order:
| BlobAnalyticsLogging
| azure.storage.blob._generated.models._models_py3.Logging
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| :keyword version: The version of Storage Analytics to configure. Required.
| :paramtype version: str
| :keyword delete: Indicates whether all delete requests should be logged. Required.
| :paramtype delete: bool
| :keyword read: Indicates whether all read requests should be logged. Required.
| :paramtype read: bool
| :keyword write: Indicates whether all write requests should be logged. Required.
| :paramtype write: bool
| :keyword retention_policy: the retention policy which determines how long the associated data
| should persist. Required.
| :paramtype retention_policy: ~azure.storage.blob.models.RetentionPolicy
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'delete': <class 'bool'>, 'read': <class 'bool'>, '...
|
| delete = False
|
| read = False
|
| retention_policy = <azure.storage.blob._models.RetentionPolicy object>
|
| version = '1.0'
|
| write = False
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.BlobBlock
Python Library Documentation: class BlobBlock in module azure.storage.blob._models
class BlobBlock(azure.storage.blob._shared.models.DictMixin)
| BlobBlock(block_id: str, state: azure.storage.blob._models.BlockState = <BlockState.LATEST: 'Latest'>) -> None
|
| BlockBlob Block class.
|
| :param str block_id:
| Block id.
| :param BlockState state:
| Block state. Possible values: BlockState.COMMITTED | BlockState.UNCOMMITTED
|
| Method resolution order:
| BlobBlock
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, block_id: str, state: azure.storage.blob._models.BlockState = <BlockState.LATEST: 'Latest'>) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'block_id': <class 'str'>, 'size': <class 'int'>, '...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.BlobClient
Python Library Documentation: class BlobClient in module azure.storage.blob._blob_client
class BlobClient(azure.storage.blob._shared.base_client.StorageAccountHostsMixin, azure.storage.blob._encryption.StorageEncryptionMixin)
| BlobClient(account_url: str, container_name: str, blob_name: str, snapshot: Union[str, Dict[str, Any], NoneType] = None, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
|
| A client to interact with a specific blob, although that blob may not yet exist.
|
| For more optional configuration, please click
| `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #optional-configuration>`__.
|
| :param str account_url:
| The URI to the storage account. In order to create a client given the full URI to the blob,
| use the :func:`from_blob_url` classmethod.
| :param container_name: The container name for the blob.
| :type container_name: str
| :param blob_name: The name of the blob with which to interact. If specified, this value will override
| a blob value specified in the blob URL.
| :type blob_name: str
| :param str snapshot:
| The optional blob snapshot on which to operate. This can be the snapshot ID string
| or the response returned from :func:`create_snapshot`.
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
| - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :keyword str api_version:
| The Storage API version to use for requests. Default value is the most recent service version that is
| compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.
|
| .. versionadded:: 12.2.0
|
| :keyword str secondary_hostname:
| The hostname of the secondary endpoint.
| :keyword int max_block_size: The maximum chunk size for uploading a block blob in chunks.
| Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_put_size: If the blob size is less than or equal max_single_put_size, then the blob will be
| uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
| the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.
| :keyword int min_large_block_upload_threshold: The minimum chunk size required to use the memory efficient
| algorithm when uploading a block blob. Defaults to 4*1024*1024+1.
| :keyword bool use_byte_buffer: Use a byte buffer for block blob uploads. Defaults to False.
| :keyword int max_page_size: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_get_size: The maximum size for a blob to be downloaded in a single call,
| the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.
| :keyword int max_chunk_get_size: The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024,
| or 4MB.
| :keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
| specifies the version of the blob to operate on.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START create_blob_client]
| :end-before: [END create_blob_client]
| :language: python
| :dedent: 8
| :caption: Creating the BlobClient from a URL to a public blob (no auth needed).
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START create_blob_client_sas_url]
| :end-before: [END create_blob_client_sas_url]
| :language: python
| :dedent: 8
| :caption: Creating the BlobClient from a SAS URL to a blob.
|
| Method resolution order:
| BlobClient
| azure.storage.blob._shared.base_client.StorageAccountHostsMixin
| azure.storage.blob._encryption.StorageEncryptionMixin
| builtins.object
|
| Methods defined here:
|
| __enter__(self) -> Self
|
| __exit__(self, *args) -> None
|
| __init__(self, account_url: str, container_name: str, blob_name: str, snapshot: Union[str, Dict[str, Any], NoneType] = None, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| abort_copy(self, copy_id: Union[str, Dict[str, Any], azure.storage.blob._models.BlobProperties], **kwargs: Any) -> None
| Abort an ongoing copy operation.
|
| This will leave a destination blob with zero length and full metadata.
| This will raise an error if the copy operation has already ended.
|
| :param copy_id:
| The copy operation to abort. This can be either an ID string, or an
| instance of BlobProperties.
| :type copy_id: str or ~azure.storage.blob.BlobProperties
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START abort_copy_blob_from_url]
| :end-before: [END abort_copy_blob_from_url]
| :language: python
| :dedent: 12
| :caption: Abort copying a blob from URL.
|
| acquire_lease(self, lease_duration: int = -1, lease_id: Optional[str] = None, **kwargs: Any) -> azure.storage.blob._lease.BlobLeaseClient
| Requests a new lease.
|
| If the blob does not have an active lease, the Blob
| Service creates a lease on the blob and returns a new lease.
|
| :param int lease_duration:
| Specifies the duration of the lease, in seconds, or negative one
| (-1) for a lease that never expires. A non-infinite lease can be
| between 15 and 60 seconds. A lease duration cannot be changed
| using renew or change. Default is -1 (infinite lease).
| :param str lease_id:
| Proposed lease ID, in a GUID string format. The Blob Service
| returns 400 (Invalid request) if the proposed lease ID is not
| in the correct format.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A BlobLeaseClient object.
| :rtype: ~azure.storage.blob.BlobLeaseClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START acquire_lease_on_blob]
| :end-before: [END acquire_lease_on_blob]
| :language: python
| :dedent: 8
| :caption: Acquiring a lease on a blob.
|
| append_block(self, data: Union[bytes, Iterable[bytes], IO[bytes]], length: Optional[int] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime, int]]
| Commits a new block of data to the end of the existing append blob.
|
| :param data:
| Content of the block.
| :type data: Union[bytes, Iterable[bytes], IO[bytes]]
| :param int length:
| Size of the block. Optional if the length of data can be determined. For Iterable and IO, if the
| length is not provided and cannot be determined, all data will be read into memory.
| :keyword bool validate_content:
| If true, calculates an MD5 hash of the block content. The storage
| service checks the hash of the content that has arrived
| with the hash that was sent. This is primarily valuable for detecting
| bitflips on the wire if using http instead of https, as https (the default),
| will already validate. Note that this MD5 hash is not stored with the
| blob.
| :keyword int maxsize_condition:
| Optional conditional header. The max length in bytes permitted for
| the append blob. If the Append Block operation would cause the blob
| to exceed that limit or if the blob size is already greater than the
| value specified in this header, the request will fail with
| MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
| :keyword int appendpos_condition:
| Optional conditional header, used only for the Append Block operation.
| A number indicating the byte offset to compare. Append Block will
| succeed only if the append position is equal to this number. If it
| is not, the request will fail with the AppendPositionConditionNotMet error
| (HTTP status code 412 - Precondition Failed).
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword str encoding:
| Defaults to UTF-8.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
| :rtype: dict(str, Any)
|
| append_block_from_url(self, copy_source_url: str, source_offset: Optional[int] = None, source_length: Optional[int] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime, int]]
| Creates a new block to be committed as part of a blob, where the contents are read from a source url.
|
| :param str copy_source_url:
| The URL of the source data. It can point to any Azure Blob or File, that is either public or has a
| shared access signature attached.
| :param int source_offset:
| This indicates the start of the range of bytes (inclusive) that has to be taken from the copy source.
| :param int source_length:
| This indicates the end of the range of bytes that has to be taken from the copy source.
| :keyword bytearray source_content_md5:
| If given, the service will calculate the MD5 hash of the block content and compare against this value.
| :keyword int maxsize_condition:
| Optional conditional header. The max length in bytes permitted for
| the append blob. If the Append Block operation would cause the blob
| to exceed that limit or if the blob size is already greater than the
| value specified in this header, the request will fail with
| MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
| :keyword int appendpos_condition:
| Optional conditional header, used only for the Append Block operation.
| A number indicating the byte offset to compare. Append Block will
| succeed only if the append position is equal to this number. If it
| is not, the request will fail with the
| AppendPositionConditionNotMet error
| (HTTP status code 412 - Precondition Failed).
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| The destination ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The destination match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~datetime.datetime source_if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the source resource has been modified since the specified time.
| :keyword ~datetime.datetime source_if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the source resource has not been modified since the specified date/time.
| :keyword str source_etag:
| The source ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions source_match_condition:
| The source match condition to use upon the etag.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey source_cpk:
| Specifies the source encryption key to use to decrypt
| the source data provided in the request.
| Use of customer-provided keys must be done over HTTPS.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword str source_authorization:
| Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
| the prefix of the source_authorization string.
| :keyword source_token_intent:
| Required when source is Azure Storage Files and using `TokenCredential` for authentication.
| This is ignored for other forms of authentication.
| Specifies the intent for all requests when using `TokenCredential` authentication. Possible values are:
|
| backup - Specifies requests are intended for backup/admin type operations, meaning that all file/directory
| ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
| :paramtype source_token_intent: Literal['backup']
| :return: Result after appending a new block.
| :rtype: Dict[str, Union[str, datetime, int]]
|
| clear_page(self, offset: int, length: int, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Clears a range of pages.
|
| :param int offset:
| Start of byte range to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int length:
| Number of bytes to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int if_sequence_number_lte:
| If the blob's sequence number is less than or equal to
| the specified value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_lt:
| If the blob's sequence number is less than the specified
| value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_eq:
| If the blob's sequence number is equal to the specified
| value, the request proceeds; otherwise it fails.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict(str, Any)
|
| close(self) -> None
| This method is to close the sockets opened by the client.
| It need not be used when using with a context manager.
|
| :return: None
| :rtype: None
|
| commit_block_list(self, block_list: List[azure.storage.blob._models.BlobBlock], content_settings: Optional[ForwardRef('ContentSettings')] = None, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| The Commit Block List operation writes a blob by specifying the list of
| block IDs that make up the blob.
|
| :param list block_list:
| List of Blockblobs.
| :param ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict[str, str]
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
|
| .. versionadded:: 12.4.0
|
| :paramtype tags: dict(str, str)
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool legal_hold:
| Specified if a legal hold should be set on the blob.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool validate_content:
| If true, calculates an MD5 hash of the page content. The storage
| service checks the hash of the content that has arrived
| with the hash that was sent. This is primarily valuable for detecting
| bitflips on the wire if using http instead of https, as https (the default),
| will already validate. Note that this MD5 hash is not stored with the
| blob.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on destination blob with a matching value.
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
| A standard blob tier value to set the blob to. For this version of the library,
| this is only applicable to block blobs on standard storage accounts.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict(str, Any)
|
| create_append_blob(self, content_settings: Optional[ForwardRef('ContentSettings')] = None, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Creates a new Append Blob. This operation creates a new 0-length append blob. The content
| of any existing blob is overwritten with the newly initialized append blob. To add content to
| the append blob, call the :func:`append_block` or :func:`append_block_from_url` method.
|
| :param ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict(str, str)
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
|
| .. versionadded:: 12.4.0
|
| :paramtype tags: dict(str, str)
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool legal_hold:
| Specified if a legal hold should be set on the blob.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict[str, Any]
|
| create_page_blob(self, size: int, content_settings: Optional[ForwardRef('ContentSettings')] = None, metadata: Optional[Dict[str, str]] = None, premium_page_blob_tier: Union[str, ForwardRef('PremiumPageBlobTier'), NoneType] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Creates a new Page Blob of the specified size.
|
| :param int size:
| This specifies the maximum size for the page blob, up to 1 TB.
| The page blob size must be aligned to a 512-byte boundary.
| :param ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict(str, str)
| :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
|
| .. versionadded:: 12.4.0
|
| :paramtype tags: dict(str, str)
| :keyword int sequence_number:
| Only for Page blobs. The sequence number is a user-controlled value that you can use to
| track requests. The value of the sequence number must be between 0
| and 2^63 - 1.The default value is 0.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool legal_hold:
| Specified if a legal hold should be set on the blob.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict[str, Any]
|
| create_snapshot(self, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Creates a snapshot of the blob.
|
| A snapshot is a read-only version of a blob that's taken at a point in time.
| It can be read, copied, or deleted, but not modified. Snapshots provide a way
| to back up a blob as it appears at a moment in time.
|
| A snapshot of a blob has the same name as the base blob from which the snapshot
| is taken, with a DateTime value appended to indicate the time at which the
| snapshot was taken.
|
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict(str, str)
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on destination blob with a matching value.
|
| .. versionadded:: 12.4.0
|
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Snapshot ID, Etag, and last modified).
| :rtype: dict[str, Any]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START create_blob_snapshot]
| :end-before: [END create_blob_snapshot]
| :language: python
| :dedent: 8
| :caption: Create a snapshot of the blob.
|
| delete_blob(self, delete_snapshots: Optional[str] = None, **kwargs: Any) -> None
| Marks the specified blob for deletion.
|
| The blob is later deleted during garbage collection.
| Note that in order to delete a blob, you must delete all of its
| snapshots. You can delete both at the same time with the delete_blob()
| operation.
|
| If a delete retention policy is enabled for the service, then this operation soft deletes the blob
| and retains the blob for a specified number of days.
| After the specified number of days, the blob's data is removed from the service during garbage collection.
| Soft deleted blob is accessible through :func:`~ContainerClient.list_blobs()` specifying `include=['deleted']`
| option. Soft-deleted blob can be restored using :func:`~BlobClient.undelete_blob()` operation.
|
| :param Optional[str] delete_snapshots:
| Required if the blob has associated snapshots. Values include:
| - "only": Deletes only the blobs snapshots.
| - "include": Deletes the blob along with all snapshots.
| :keyword Optional[str] version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to delete.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
|
| :keyword lease:
| Required if the blob has an active lease. If specified, delete_blob only
| succeeds if the blob's lease is active and matches this ID. Value can be a
| BlobLeaseClient object or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~datetime.datetime access_tier_if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the access-tier has been modified since the specified date/time.
| :keyword ~datetime.datetime access_tier_if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the access-tier has been modified since the specified date/time.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_hello_world.py
| :start-after: [START delete_blob]
| :end-before: [END delete_blob]
| :language: python
| :dedent: 12
| :caption: Delete a blob.
|
| delete_immutability_policy(self, **kwargs: Any) -> None
| The Delete Immutability Policy operation deletes the immutability policy on the blob.
|
| .. versionadded:: 12.10.0
| This operation was introduced in API version '2020-10-02'.
|
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to check if it exists.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Key value pairs of blob tags.
| :rtype: Dict[str, str]
|
| download_blob(self, offset: Optional[int] = None, length: Optional[int] = None, *, encoding: Optional[str] = None, **kwargs: Any) -> Union[azure.storage.blob._download.StorageStreamDownloader[str], azure.storage.blob._download.StorageStreamDownloader[bytes]]
| Downloads a blob to the StorageStreamDownloader. The readall() method must
| be used to read all the content or readinto() must be used to download the blob into
| a stream. Using chunks() returns an iterator which allows the user to iterate over the content in chunks.
|
| :param int offset:
| Start of byte range to use for downloading a section of the blob.
| Must be set if length is provided.
| :param int length:
| Number of bytes to read from the stream. This is optional, but
| should be supplied for optimal performance.
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to download.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
|
| :keyword bool validate_content:
| If true, calculates an MD5 hash for each chunk of the blob. The storage
| service checks the hash of the content that has arrived with the hash
| that was sent. This is primarily valuable for detecting bitflips on
| the wire if using http instead of https, as https (the default), will
| already validate. Note that this MD5 hash is not stored with the
| blob. Also note that if enabled, the memory-efficient upload algorithm
| will not be used because computing the MD5 hash requires buffering
| entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
| :keyword lease:
| Required if the blob has an active lease. If specified, download_blob only
| succeeds if the blob's lease is active and matches this ID. Value can be a
| BlobLeaseClient object or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword int max_concurrency:
| Maximum number of parallel connections to use when transferring the blob in chunks.
| This option does not affect the underlying connection pool, and may
| require a separate configuration of the connection pool.
| :keyword Optional[str] encoding:
| Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
| :keyword progress_hook:
| A callback to track the progress of a long running download. The signature is
| function(current: int, total: int) where current is the number of bytes transferred
| so far, and total is the total size of the download.
| :paramtype progress_hook: Callable[[int, int], None]
| :keyword bool decompress: If True, any compressed content, identified by the Content-Encoding header, will be
| decompressed automatically before being returned. Default value is True.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
| the timeout will apply to each call individually.
| multiple calls to the Azure service and the timeout will apply to
| each call individually.
| :return: A streaming object (StorageStreamDownloader)
| :rtype: ~azure.storage.blob.StorageStreamDownloader
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_hello_world.py
| :start-after: [START download_a_blob]
| :end-before: [END download_a_blob]
| :language: python
| :dedent: 12
| :caption: Download a blob.
|
| exists(self, **kwargs: Any) -> bool
| Returns True if a blob exists with the defined parameters, and returns
| False otherwise.
|
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to check if it exists.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: boolean
| :rtype: bool
|
| get_account_information(self, **kwargs: Any) -> Dict[str, str]
| Gets information related to the storage account in which the blob resides.
|
| The information can also be retrieved if the user has a SAS to a container or blob.
| The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
| :return: A dict of account information (SKU and account type).
| :rtype: dict(str, str)
|
| get_blob_properties(self, **kwargs: Any) -> azure.storage.blob._models.BlobProperties
| Returns all user-defined metadata, standard HTTP properties, and
| system properties for the blob. It does not return the content of the blob.
|
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to get properties.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
|
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: BlobProperties
| :rtype: ~azure.storage.blob.BlobProperties
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START get_blob_properties]
| :end-before: [END get_blob_properties]
| :language: python
| :dedent: 8
| :caption: Getting the properties for a blob.
|
| get_blob_tags(self, **kwargs: Any) -> Dict[str, str]
| The Get Tags operation enables users to get tags on a blob or specific blob version, or snapshot.
|
| .. versionadded:: 12.4.0
| This operation was introduced in API version '2019-12-12'.
|
| :keyword Optional[str] version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to add tags to.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on destination blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Key value pairs of blob tags.
| :rtype: Dict[str, str]
|
| get_block_list(self, block_list_type: str = 'committed', **kwargs: Any) -> Tuple[List[azure.storage.blob._models.BlobBlock], List[azure.storage.blob._models.BlobBlock]]
| The Get Block List operation retrieves the list of blocks that have
| been uploaded as part of a block blob.
|
| :param str block_list_type:
| Specifies whether to return the list of committed
| blocks, the list of uncommitted blocks, or both lists together.
| Possible values include: 'committed', 'uncommitted', 'all'
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on destination blob with a matching value.
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A tuple of two lists - committed and uncommitted blocks
| :rtype: Tuple[List[BlobBlock], List[BlobBlock]]
|
| get_page_range_diff_for_managed_disk(self, previous_snapshot_url: str, offset: Optional[int] = None, length: Optional[int] = None, **kwargs: Any) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]
| Returns the list of valid page ranges for a managed disk or snapshot.
|
| .. note::
| This operation is only available for managed disk accounts.
|
| .. versionadded:: 12.2.0
| This operation was introduced in API version '2019-07-07'.
|
| :param str previous_snapshot_url:
| Specifies the URL of a previous snapshot of the managed disk.
| The response will only contain pages that were changed between the target blob and
| its previous snapshot.
| :param int offset:
| Start of byte range to use for getting valid page ranges.
| If no length is given, all bytes after the offset will be searched.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int length:
| Number of bytes to use for getting valid page ranges.
| If length is given, offset must be provided.
| This range will return valid page ranges from the offset start up to
| the specified length.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return:
| A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
| The first element are filled page ranges, the 2nd element is cleared page ranges.
| :rtype: tuple(list(dict(str, str), list(dict(str, str))
|
| get_page_ranges(self, offset: Optional[int] = None, length: Optional[int] = None, previous_snapshot_diff: Union[str, Dict[str, Any], NoneType] = None, **kwargs: Any) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]
| DEPRECATED: Returns the list of valid page ranges for a Page Blob or snapshot
| of a page blob.
|
| :param int offset:
| Start of byte range to use for getting valid page ranges.
| If no length is given, all bytes after the offset will be searched.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int length:
| Number of bytes to use for getting valid page ranges.
| If length is given, offset must be provided.
| This range will return valid page ranges from the offset start up to
| the specified length.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param str previous_snapshot_diff:
| The snapshot diff parameter that contains an opaque DateTime value that
| specifies a previous blob snapshot to be compared
| against a more recent snapshot or the current blob.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return:
| A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
| The first element are filled page ranges, the 2nd element is cleared page ranges.
| :rtype: tuple(list(dict(str, str), list(dict(str, str))
|
| list_page_ranges(self, *, offset: Optional[int] = None, length: Optional[int] = None, previous_snapshot: Union[str, Dict[str, Any], NoneType] = None, **kwargs: Any) -> azure.core.paging.ItemPaged[azure.storage.blob._models.PageRange]
| Returns the list of valid page ranges for a Page Blob or snapshot
| of a page blob. If `previous_snapshot` is specified, the result will be
| a diff of changes between the target blob and the previous snapshot.
|
| :keyword int offset:
| Start of byte range to use for getting valid page ranges.
| If no length is given, all bytes after the offset will be searched.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :keyword int length:
| Number of bytes to use for getting valid page ranges.
| If length is given, offset must be provided.
| This range will return valid page ranges from the offset start up to
| the specified length.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :keyword previous_snapshot:
| A snapshot value that specifies that the response will contain only pages that were changed
| between target blob and previous snapshot. Changed pages include both updated and cleared
| pages. The target blob may be a snapshot, as long as the snapshot specified by `previous_snapshot`
| is the older of the two.
| :paramtype previous_snapshot: str or Dict[str, Any]
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int results_per_page:
| The maximum number of page ranges to retrieve per API call.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) of PageRange.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.PageRange]
|
| query_blob(self, query_expression: str, **kwargs: Any) -> azure.storage.blob._quick_query_helper.BlobQueryReader
| Enables users to select/project on blob/or blob snapshot data by providing simple query expressions.
| This operations returns a BlobQueryReader, users need to use readall() or readinto() to get query data.
|
| :param str query_expression:
| Required. a query statement. For more details see
| https://learn.microsoft.com/azure/storage/blobs/query-acceleration-sql-reference.
| :keyword Callable[~azure.storage.blob.BlobQueryError] on_error:
| A function to be called on any processing errors returned by the service.
| :keyword blob_format:
| Optional. Defines the serialization of the data currently stored in the blob. The default is to
| treat the blob data as CSV data formatted in the default dialect. This can be overridden with
| a custom DelimitedTextDialect, or DelimitedJsonDialect or "ParquetDialect" (passed as a string or enum).
| These dialects can be passed through their respective classes, the QuickQueryDialect enum or as a string
|
| .. note::
| "ParquetDialect" is in preview, so some features may not work as intended.
|
| :paramtype blob_format: ~azure.storage.blob.DelimitedTextDialect or ~azure.storage.blob.DelimitedJsonDialect
| or ~azure.storage.blob.QuickQueryDialect or str
| :keyword output_format:
| Optional. Defines the output serialization for the data stream. By default the data will be returned
| as it is represented in the blob (Parquet formats default to DelimitedTextDialect).
| By providing an output format, the blob data will be reformatted according to that profile.
| This value can be a DelimitedTextDialect or a DelimitedJsonDialect or ArrowDialect.
| These dialects can be passed through their respective classes, the QuickQueryDialect enum or as a string
| :paramtype output_format: ~azure.storage.blob.DelimitedTextDialect or ~azure.storage.blob.DelimitedJsonDialect
| or List[~azure.storage.blob.ArrowDialect] or ~azure.storage.blob.QuickQueryDialect or str
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A streaming object (BlobQueryReader)
| :rtype: ~azure.storage.blob.BlobQueryReader
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_query.py
| :start-after: [START query]
| :end-before: [END query]
| :language: python
| :dedent: 4
| :caption: select/project on blob/or blob snapshot data by providing simple query expressions.
|
| resize_blob(self, size: int, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Resizes a page blob to the specified size.
|
| If the specified value is less than the current size of the blob,
| then all pages above the specified value are cleared.
|
| :param int size:
| Size used to resize blob. Maximum size for a page blob is up to 1 TB.
| The page blob size must be aligned to a 512-byte boundary.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict(str, Any)
|
| seal_append_blob(self, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime, int]]
| The Seal operation seals the Append Blob to make it read-only.
|
| .. versionadded:: 12.4.0
|
| :keyword int appendpos_condition:
| Optional conditional header, used only for the Append Block operation.
| A number indicating the byte offset to compare. Append Block will
| succeed only if the append position is equal to this number. If it
| is not, the request will fail with the AppendPositionConditionNotMet error
| (HTTP status code 412 - Precondition Failed).
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
| :rtype: dict(str, Any)
|
| set_blob_metadata(self, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Sets user-defined metadata for the blob as one or more name-value pairs.
|
| :param metadata:
| Dict containing name and value pairs. Each call to this operation
| replaces all existing metadata attached to the blob. To remove all
| metadata from the blob, call this operation with no metadata headers.
| :type metadata: dict(str, str)
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified)
| :rtype: Dict[str, Union[str, datetime]]
|
| set_blob_tags(self, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Any]
| The Set Tags operation enables users to set tags on a blob or specific blob version, but not snapshot.
| Each call to this operation replaces all existing tags attached to the blob. To remove all
| tags from the blob, call this operation with no tags set.
|
| .. versionadded:: 12.4.0
| This operation was introduced in API version '2019-12-12'.
|
| :param tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
| :type tags: dict(str, str)
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to add tags to.
| :keyword bool validate_content:
| If true, calculates an MD5 hash of the tags content. The storage
| service checks the hash of the content that has arrived
| with the hash that was sent. This is primarily valuable for detecting
| bitflips on the wire if using http instead of https, as https (the default),
| will already validate. Note that this MD5 hash is not stored with the
| blob.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on destination blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified)
| :rtype: Dict[str, Any]
|
| set_http_headers(self, content_settings: Optional[ForwardRef('ContentSettings')] = None, **kwargs: Any) -> Dict[str, Any]
| Sets system properties on the blob.
|
| If one property is set for the content_settings, all properties will be overridden.
|
| :param ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified)
| :rtype: Dict[str, Any]
|
| set_immutability_policy(self, immutability_policy: 'ImmutabilityPolicy', **kwargs: Any) -> Dict[str, str]
| The Set Immutability Policy operation sets the immutability policy on the blob.
|
| .. versionadded:: 12.10.0
| This operation was introduced in API version '2020-10-02'.
|
| :param ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to check if it exists.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Key value pairs of blob tags.
| :rtype: Dict[str, str]
|
| set_legal_hold(self, legal_hold: bool, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime, bool]]
| The Set Legal Hold operation sets a legal hold on the blob.
|
| .. versionadded:: 12.10.0
| This operation was introduced in API version '2020-10-02'.
|
| :param bool legal_hold:
| Specified if a legal hold should be set on the blob.
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to check if it exists.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Key value pairs of blob tags.
| :rtype: Dict[str, Union[str, datetime, bool]]
|
| set_premium_page_blob_tier(self, premium_page_blob_tier: 'PremiumPageBlobTier', **kwargs: Any) -> None
| Sets the page blob tiers on the blob. This API is only supported for page blobs on premium accounts.
|
| :param premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :return: None
| :rtype: None
|
| set_sequence_number(self, sequence_number_action: Union[str, ForwardRef('SequenceNumberAction')], sequence_number: Optional[str] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Sets the blob sequence number.
|
| :param str sequence_number_action:
| This property indicates how the service should modify the blob's sequence
| number. See :class:`~azure.storage.blob.SequenceNumberAction` for more information.
| :param str sequence_number:
| This property sets the blob's sequence number. The sequence number is a
| user-controlled property that you can use to track requests and manage
| concurrency issues.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict(str, Any)
|
| set_standard_blob_tier(self, standard_blob_tier: Union[str, ForwardRef('StandardBlobTier')], **kwargs: Any) -> None
| This operation sets the tier on a block blob.
|
| A block blob's tier determines Hot/Cool/Archive/Smart storage type.
| This operation does not update the blob's ETag.
|
| :param standard_blob_tier:
| Indicates the tier to be set on the blob. Options include 'Hot', 'Cool',
| 'Archive', 'Smart'. The hot tier is optimized for storing data that is accessed
| frequently. The cool storage tier is optimized for storing data that
| is infrequently accessed and stored for at least a month. The archive
| tier is optimized for storing data that is rarely accessed and stored
| for at least six months with flexible latency requirements. The smart
| tier is optimized automatically to determine the most cost-effective access
| tier with no performance impact.
| :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier
| :keyword ~azure.storage.blob.RehydratePriority rehydrate_priority:
| Indicates the priority with which to rehydrate an archived blob
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to download.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :return: None
| :rtype: None
|
| stage_block(self, block_id: str, data: Union[bytes, Iterable[bytes], IO[bytes]], length: Optional[int] = None, **kwargs: Any) -> Dict[str, Any]
| Creates a new block to be committed as part of a blob.
|
| :param str block_id: A string value that identifies the block.
| The string should be less than or equal to 64 bytes in size.
| For a given blob, the block_id must be the same size for each block.
| :param data: The blob data.
| :type data: Union[bytes, Iterable[bytes], IO[bytes]]
| :param int length:
| Size of the block. Optional if the length of data can be determined. For Iterable and IO, if the
| length is not provided and cannot be determined, all data will be read into memory.
| :keyword bool validate_content:
| If true, calculates an MD5 hash for each chunk of the blob. The storage
| service checks the hash of the content that has arrived with the hash
| that was sent. This is primarily valuable for detecting bitflips on
| the wire if using http instead of https, as https (the default), will
| already validate. Note that this MD5 hash is not stored with the
| blob. Also note that if enabled, the memory-efficient upload algorithm
| will not be used because computing the MD5 hash requires buffering
| entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword str encoding:
| Defaults to UTF-8.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob property dict.
| :rtype: dict[str, Any]
|
| stage_block_from_url(self, block_id: str, source_url: str, source_offset: Optional[int] = None, source_length: Optional[int] = None, source_content_md5: Union[bytes, bytearray, NoneType] = None, **kwargs: Any) -> Dict[str, Any]
| Creates a new block to be committed as part of a blob where
| the contents are read from a URL.
|
| :param str block_id: A string value that identifies the block.
| The string should be less than or equal to 64 bytes in size.
| For a given blob, the block_id must be the same size for each block.
| :param str source_url: The URL.
| :param int source_offset:
| Start of byte range to use for the block.
| Must be set if source length is provided.
| :param int source_length: The size of the block in bytes.
| :param bytearray source_content_md5:
| Specify the md5 calculated for the range of
| bytes that must be read from the copy source.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey source_cpk:
| Specifies the source encryption key to use to decrypt
| the source data provided in the request.
| Use of customer-provided keys must be done over HTTPS.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword str source_authorization:
| Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
| the prefix of the source_authorization string.
| :keyword source_token_intent:
| Required when source is Azure Storage Files and using `TokenCredential` for authentication.
| This is ignored for other forms of authentication.
| Specifies the intent for all requests when using `TokenCredential` authentication. Possible values are:
|
| backup - Specifies requests are intended for backup/admin type operations, meaning that all file/directory
| ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
| :paramtype source_token_intent: Literal['backup']
| :return: Blob property dict.
| :rtype: dict[str, Any]
|
| start_copy_from_url(self, source_url: str, metadata: Optional[Dict[str, str]] = None, incremental_copy: bool = False, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Copies a blob from the given URL.
|
| This operation returns a dictionary containing `copy_status` and `copy_id`,
| which can be used to check the status of or abort the copy operation.
| `copy_status` will be 'success' if the copy completed synchronously or
| 'pending' if the copy has been started asynchronously. For asynchronous copies,
| the status can be checked by polling the :func:`get_blob_properties` method and
| checking the copy status. Set `requires_sync` to True to force the copy to be synchronous.
| The Blob service copies blobs on a best-effort basis.
|
| The source blob for a copy operation may be a block blob, an append blob,
| or a page blob. If the destination blob already exists, it must be of the
| same blob type as the source blob. Any existing destination blob will be
| overwritten. The destination blob cannot be modified while a copy operation
| is in progress.
|
| When copying from a page blob, the Blob service creates a destination page
| blob of the source blob's length, initially containing all zeroes. Then
| the source page ranges are enumerated, and non-empty ranges are copied.
|
| For a block blob or an append blob, the Blob service creates a committed
| blob of zero length before returning from this operation. When copying
| from a block blob, all committed blocks and their block IDs are copied.
| Uncommitted blocks are not copied. At the end of the copy operation, the
| destination blob will have the same committed block count as the source.
|
| When copying from an append blob, all committed blocks are copied. At the
| end of the copy operation, the destination blob will have the same committed
| block count as the source.
|
| :param str source_url:
| A URL of up to 2 KB in length that specifies a file or blob.
| The value should be URL-encoded as it would appear in a request URI.
| If the source is in another account, the source must either be public
| or must be authenticated via a shared access signature. If the source
| is public, no authentication is required.
| Examples:
| https://myaccount.blob.core.windows.net/mycontainer/myblob
|
| https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
| https://otheraccount.blob.core.windows.net/mycontainer/myblob?sastoken
| :param metadata:
| Name-value pairs associated with the blob as metadata. If no name-value
| pairs are specified, the operation will copy the metadata from the
| source blob or file to the destination blob. If one or more name-value
| pairs are specified, the destination blob is created with the specified
| metadata, and metadata is not copied from the source blob or file.
| :type metadata: dict(str, str)
| :param bool incremental_copy:
| Copies the snapshot of the source page blob to a destination page blob.
| The snapshot is copied such that only the differential changes between
| the previously copied snapshot are transferred to the destination.
| The copied snapshots are complete copies of the original snapshot and
| can be read or copied from as usual. Defaults to False.
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_).
|
| The (case-sensitive) literal "COPY" can instead be passed to copy tags from the source blob.
| This option is only available when `incremental_copy=False` and `requires_sync=True`.
|
| .. versionadded:: 12.4.0
|
| :paramtype tags: dict(str, str) or Literal["COPY"]
| :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool legal_hold:
| Specified if a legal hold should be set on the blob.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword ~datetime.datetime source_if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this conditional header to copy the blob only if the source
| blob has been modified since the specified date/time.
| :keyword ~datetime.datetime source_if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this conditional header to copy the blob only if the source blob
| has not been modified since the specified date/time.
| :keyword str source_etag:
| The source ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions source_match_condition:
| The source match condition to use upon the etag.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this conditional header to copy the blob only
| if the destination blob has been modified since the specified date/time.
| If the destination blob has not been modified, the Blob service returns
| status code 412 (Precondition Failed).
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this conditional header to copy the blob only
| if the destination blob has not been modified since the specified
| date/time. If the destination blob has been modified, the Blob service
| returns status code 412 (Precondition Failed).
| :keyword str etag:
| The destination ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The destination match condition to use upon the etag.
| :keyword destination_lease:
| The lease ID specified for this header must match the lease ID of the
| destination blob. If the request does not include the lease ID or it is not
| valid, the operation fails with status code 412 (Precondition Failed).
| :paramtype destination_lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword source_lease:
| Specify this to perform the Copy Blob operation only if
| the lease ID given matches the active lease ID of the source blob.
| :paramtype source_lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
| A standard blob tier value to set the blob to. For this version of the library,
| this is only applicable to block blobs on standard storage accounts.
| :keyword ~azure.storage.blob.RehydratePriority rehydrate_priority:
| Indicates the priority with which to rehydrate an archived blob
| :keyword bool seal_destination_blob:
| Seal the destination append blob. This operation is only for append blob.
|
| .. versionadded:: 12.4.0
|
| :keyword bool requires_sync:
| Enforces that the service will not return a response until the copy is complete.
| :keyword str source_authorization:
| Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
| the prefix of the source_authorization string. This option is only available when `incremental_copy` is
| set to False and `requires_sync` is set to True.
|
| .. versionadded:: 12.9.0
|
| :keyword source_token_intent:
| Required when source is Azure Storage Files and using `TokenCredential` for authentication.
| This is ignored for other forms of authentication.
| Specifies the intent for all requests when using `TokenCredential` authentication. Possible values are:
|
| backup - Specifies requests are intended for backup/admin type operations, meaning that all file/directory
| ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
| :paramtype source_token_intent: Literal['backup']
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the sync copied blob. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.10.0
|
| :return: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
| :rtype: dict[str, Union[str, ~datetime.datetime]]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START copy_blob_from_url]
| :end-before: [END copy_blob_from_url]
| :language: python
| :dedent: 12
| :caption: Copy a blob from a URL.
|
| undelete_blob(self, **kwargs: Any) -> None
| Restores soft-deleted blobs or snapshots.
|
| Operation will only be successful if used within the specified number of days
| set in the delete retention policy.
|
| If blob versioning is enabled, the base blob cannot be restored using this
| method. Instead use :func:`start_copy_from_url` with the URL of the blob version
| you wish to promote to the current version.
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START undelete_blob]
| :end-before: [END undelete_blob]
| :language: python
| :dedent: 8
| :caption: Undeleting a blob.
|
| upload_blob(self, data: Union[bytes, str, Iterable[~AnyStr], IO[bytes]], blob_type: Union[str, azure.storage.blob._models.BlobType] = <BlobType.BLOCKBLOB: 'BlockBlob'>, length: Optional[int] = None, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Any]
| Creates a new blob from a data source with automatic chunking.
|
| :param data: The blob data to upload.
| :type data: Union[bytes, str, Iterable[AnyStr], IO[bytes]]
| :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be
| either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob.
| :param int length:
| Number of bytes to read from the stream. This is optional, but
| should be supplied for optimal performance.
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict(str, str)
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
|
| .. versionadded:: 12.4.0
|
| :paramtype tags: dict(str, str)
| :keyword bool overwrite: Whether the blob to be uploaded should overwrite the current data.
| If True, upload_blob will overwrite the existing data. If set to False, the
| operation will fail with ResourceExistsError. The exception to the above is with Append
| blob types: if set to False and the data already exists, an error will not be raised
| and the data will be appended to the existing blob. If set overwrite=True, then the existing
| append blob will be deleted, and a new one created. Defaults to False.
| :keyword ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :keyword bool validate_content:
| If true, calculates an MD5 hash for each chunk of the blob. The storage
| service checks the hash of the content that has arrived with the hash
| that was sent. This is primarily valuable for detecting bitflips on
| the wire if using http instead of https, as https (the default), will
| already validate. Note that this MD5 hash is not stored with the
| blob. Also note that if enabled, the memory-efficient upload algorithm
| will not be used because computing the MD5 hash requires buffering
| entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
| :keyword lease:
| Required if the blob has an active lease. If specified, upload_blob only succeeds if the
| blob's lease is active and matches this ID. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
| A standard blob tier value to set the blob to. For this version of the library,
| this is only applicable to block blobs on standard storage accounts.
| :keyword ~azure.storage.blob.ImmutabilityPolicy immutability_policy:
| Specifies the immutability policy of a blob, blob snapshot or blob version.
| Currently this parameter of upload_blob() API is for BlockBlob only.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword bool legal_hold:
| Specified if a legal hold should be set on the blob.
| Currently this parameter of upload_blob() API is for BlockBlob only.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword int maxsize_condition:
| Optional conditional header. The max length in bytes permitted for
| the append blob. If the Append Block operation would cause the blob
| to exceed that limit or if the blob size is already greater than the
| value specified in this header, the request will fail with
| MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
| :keyword int max_concurrency:
| Maximum number of parallel connections to use when transferring the blob in chunks.
| This option does not affect the underlying connection pool, and may
| require a separate configuration of the connection pool.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword str encoding:
| Defaults to UTF-8.
| :keyword progress_hook:
| A callback to track the progress of a long running upload. The signature is
| function(current: int, total: Optional[int]) where current is the number of bytes transferred
| so far, and total is the size of the blob or None if the size is unknown.
| :paramtype progress_hook: Callable[[int, Optional[int]], None]
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
| the timeout will apply to each call individually.
| :return: Blob-updated property Dict (Etag and last modified)
| :rtype: Dict[str, Any]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_hello_world.py
| :start-after: [START upload_a_blob]
| :end-before: [END upload_a_blob]
| :language: python
| :dedent: 12
| :caption: Upload a blob to the container.
|
| upload_blob_from_url(self, source_url: str, *, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Any]
| Creates a new Block Blob where the content of the blob is read from a given URL.
| The content of an existing blob is overwritten with the new blob.
|
| :param str source_url:
| A URL of up to 2 KB in length that specifies a file or blob.
| The value should be URL-encoded as it would appear in a request URI.
| The source must either be public or must be authenticated via a shared
| access signature as part of the url or using the source_authorization keyword.
| If the source is public, no authentication is required.
| Examples:
| https://myaccount.blob.core.windows.net/mycontainer/myblob
|
| https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
| https://otheraccount.blob.core.windows.net/mycontainer/myblob?sastoken
| :keyword dict(str, str) metadata:
| Name-value pairs associated with the blob as metadata.
| :keyword bool overwrite: Whether the blob to be uploaded should overwrite the current data.
| If True, upload_blob will overwrite the existing data. If set to False, the
| operation will fail with ResourceExistsError.
| :keyword bool include_source_blob_properties:
| Indicates if properties from the source blob should be copied. Defaults to True.
| :keyword tags:
| Name-value pairs associated with the blob as tag. Tags are case-sensitive.
| The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters,
| and tag values must be between 0 and 256 characters.
| Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9),
| space (' '), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_)
| :paramtype tags: dict(str, str)
| :keyword bytearray source_content_md5:
| Specify the md5 that is used to verify the integrity of the source bytes.
| :keyword ~datetime.datetime source_if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the source resource has been modified since the specified time.
| :keyword ~datetime.datetime source_if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the source resource has not been modified since the specified date/time.
| :keyword str source_etag:
| The source ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions source_match_condition:
| The source match condition to use upon the etag.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| The destination ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The destination match condition to use upon the etag.
| :keyword destination_lease:
| The lease ID specified for this header must match the lease ID of the
| destination blob. If the request does not include the lease ID or it is not
| valid, the operation fails with status code 412 (Precondition Failed).
| :paramtype destination_lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey source_cpk:
| Specifies the source encryption key to use to decrypt
| the source data provided in the request.
| Use of customer-provided keys must be done over HTTPS.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
| :keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
| A standard blob tier value to set the blob to. For this version of the library,
| this is only applicable to block blobs on standard storage accounts.
| :keyword str source_authorization:
| Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
| the prefix of the source_authorization string.
| :keyword source_token_intent:
| Required when source is Azure Storage Files and using `TokenCredential` for authentication.
| This is ignored for other forms of authentication.
| Specifies the intent for all requests when using `TokenCredential` authentication. Possible values are:
|
| backup - Specifies requests are intended for backup/admin type operations, meaning that all file/directory
| ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
| :paramtype source_token_intent: Literal['backup']
| :return: Blob-updated property Dict (Etag and last modified)
| :rtype: Dict[str, Any]
|
| upload_page(self, page: bytes, offset: int, length: int, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| The Upload Pages operation writes a range of pages to a page blob.
|
| :param bytes page:
| Content of the page.
| :param int offset:
| Start of byte range to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int length:
| Number of bytes to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword bool validate_content:
| If true, calculates an MD5 hash of the page content. The storage
| service checks the hash of the content that has arrived
| with the hash that was sent. This is primarily valuable for detecting
| bitflips on the wire if using http instead of https, as https (the default),
| will already validate. Note that this MD5 hash is not stored with the
| blob.
| :keyword int if_sequence_number_lte:
| If the blob's sequence number is less than or equal to
| the specified value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_lt:
| If the blob's sequence number is less than the specified
| value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_eq:
| If the blob's sequence number is equal to the specified
| value, the request proceeds; otherwise it fails.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword str encoding:
| Defaults to UTF-8.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Blob-updated property dict (Etag and last modified).
| :rtype: dict(str, Any)
|
| upload_pages_from_url(self, source_url: str, offset: int, length: int, source_offset: int, **kwargs: Any) -> Dict[str, Any]
| The Upload Pages operation writes a range of pages to a page blob where
| the contents are read from a URL.
|
| :param str source_url:
| The URL of the source data. It can point to any Azure Blob or File, that is either public or has a
| shared access signature attached.
| :param int offset:
| Start of byte range to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int length:
| Number of bytes to use for writing to a section of the blob.
| Pages must be aligned with 512-byte boundaries, the start offset
| must be a modulus of 512 and the length must be a modulus of
| 512.
| :param int source_offset:
| This indicates the start of the range of bytes(inclusive) that has to be taken from the copy source.
| The service will read the same number of bytes as the destination range (length-offset).
| :keyword bytes source_content_md5:
| If given, the service will calculate the MD5 hash of the block content and compare against this value.
| :keyword ~datetime.datetime source_if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the source resource has been modified since the specified time.
| :keyword ~datetime.datetime source_if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the source resource has not been modified since the specified date/time.
| :keyword str source_etag:
| The source ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions source_match_condition:
| The source match condition to use upon the etag.
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int if_sequence_number_lte:
| If the blob's sequence number is less than or equal to
| the specified value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_lt:
| If the blob's sequence number is less than the specified
| value, the request proceeds; otherwise it fails.
| :keyword int if_sequence_number_eq:
| If the blob's sequence number is equal to the specified
| value, the request proceeds; otherwise it fails.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| The destination ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The destination match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey source_cpk:
| Specifies the source encryption key to use to decrypt
| the source data provided in the request.
| Use of customer-provided keys must be done over HTTPS.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword str source_authorization:
| Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
| the prefix of the source_authorization string.
| :keyword source_token_intent:
| Required when source is Azure Storage Files and using `TokenCredential` for authentication.
| This is ignored for other forms of authentication.
| Specifies the intent for all requests when using `TokenCredential` authentication. Possible values are:
|
| backup - Specifies requests are intended for backup/admin type operations, meaning that all file/directory
| ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
| :paramtype source_token_intent: Literal['backup']
| :return: Response after uploading pages from specified URL.
| :rtype: Dict[str, Any]
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_blob_url(blob_url: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, snapshot: Union[str, Dict[str, Any], NoneType] = None, **kwargs: Any) -> Self
| Create BlobClient from a blob url. This doesn't support customized blob url with '/' in blob name.
|
| :param str blob_url:
| The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be
| either the primary endpoint, or the secondary endpoint depending on the current `location_mode`.
| :type blob_url: str
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token, or the connection string already has shared
| access key values. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
| - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :type credential:
| ~azure.core.credentials.AzureNamedKeyCredential or
| ~azure.core.credentials.AzureSasCredential or
| ~azure.core.credentials.TokenCredential or
| str or dict[str, str] or None
| :param str snapshot:
| The optional blob snapshot on which to operate. This can be the snapshot ID string
| or the response returned from :func:`create_snapshot`. If specified, this will override
| the snapshot in the url.
| :keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
| specifies the version of the blob to operate on.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
| :return: A Blob client.
| :rtype: ~azure.storage.blob.BlobClient
|
| from_connection_string(conn_str: str, container_name: str, blob_name: str, snapshot: Union[str, Dict[str, Any], NoneType] = None, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> Self
| Create BlobClient from a Connection String.
|
| :param str conn_str:
| A connection string to an Azure Storage account.
| :param container_name: The container name for the blob.
| :type container_name: str
| :param blob_name: The name of the blob with which to interact.
| :type blob_name: str
| :param str snapshot:
| The optional blob snapshot on which to operate. This can be the snapshot ID string
| or the response returned from :func:`create_snapshot`.
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token, or the connection string already has shared
| access key values. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| Credentials provided here will take precedence over those in the connection string.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :type credential:
| ~azure.core.credentials.AzureNamedKeyCredential or
| ~azure.core.credentials.AzureSasCredential or
| ~azure.core.credentials.TokenCredential or
| str or dict[str, str] or None
| :keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
| specifies the version of the blob to operate on.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
| :return: A Blob client.
| :rtype: ~azure.storage.blob.BlobClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START auth_from_connection_string_blob]
| :end-before: [END auth_from_connection_string_blob]
| :language: python
| :dedent: 8
| :caption: Creating the BlobClient from a connection string.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Readonly properties inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| api_version
| The version of the Storage API used for requests.
|
| :rtype: str
|
| primary_endpoint
| The full primary endpoint URL.
|
| :return: The full primary endpoint URL.
| :rtype: str
|
| primary_hostname
| The hostname of the primary endpoint.
|
| :return: The hostname of the primary endpoint.
| :rtype: str
|
| secondary_endpoint
| The full secondary endpoint URL if configured.
|
| If not available a ValueError will be raised. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The full secondary endpoint URL.
| :rtype: str
| :raise ValueError: If no secondary endpoint is configured.
|
| secondary_hostname
| The hostname of the secondary endpoint.
|
| If not available this will be None. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The hostname of the secondary endpoint, or None if not configured.
| :rtype: Optional[str]
|
| url
| The full endpoint URL to this entity, including SAS token if used.
|
| This could be either the primary endpoint,
| or the secondary endpoint depending on the current :func:`location_mode`.
|
| :return: The full endpoint URL to this entity, including SAS token if used.
| :rtype: str
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| location_mode
| The location mode that the client is currently using.
|
| By default this will be "primary". Options include "primary" and "secondary".
|
| :return: The current location mode.
| :rtype: str
azure-storage-blob.BlobImmutabilityPolicyMode
Python Library Documentation: class BlobImmutabilityPolicyMode in module azure.storage.blob._models
class BlobImmutabilityPolicyMode(builtins.str, enum.Enum)
| BlobImmutabilityPolicyMode(*values)
|
| Specifies the immutability policy mode to set on the blob.
| "Mutable" can only be returned by service, don't set to "Mutable".
|
| Method resolution order:
| BlobImmutabilityPolicyMode
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| LOCKED = <BlobImmutabilityPolicyMode.LOCKED: 'Locked'>
|
| MUTABLE = <BlobImmutabilityPolicyMode.MUTABLE: 'Mutable'>
|
| UNLOCKED = <BlobImmutabilityPolicyMode.UNLOCKED: 'Unlocked'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.BlobLeaseClient
Python Library Documentation: class BlobLeaseClient in module azure.storage.blob._lease
class BlobLeaseClient(builtins.object)
| BlobLeaseClient(client: Union[ForwardRef('BlobClient'), ForwardRef('ContainerClient')], lease_id: Optional[str] = None) -> None
|
| Creates a new BlobLeaseClient.
|
| This client provides lease operations on a BlobClient or ContainerClient.
| :param client: The client of the blob or container to lease.
| :type client: Union[BlobClient, ContainerClient]
| :param lease_id: A string representing the lease ID of an existing lease. This value does not need to be
| specified in order to acquire a new lease, or break one.
| :type lease_id: Optional[str]
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __init__(self, client: Union[ForwardRef('BlobClient'), ForwardRef('ContainerClient')], lease_id: Optional[str] = None) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| acquire(self, lease_duration: int = -1, **kwargs: Any) -> None
| Requests a new lease.
|
| If the container does not have an active lease, the Blob service creates a
| lease on the container and returns a new lease ID.
|
| :param int lease_duration:
| Specifies the duration of the lease, in seconds, or negative one
| (-1) for a lease that never expires. A non-infinite lease can be
| between 15 and 60 seconds. A lease duration cannot be changed
| using renew or change. Default is -1 (infinite lease).
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| break_lease(self, lease_break_period: Optional[int] = None, **kwargs: Any) -> int
| Break the lease, if the container or blob has an active lease.
|
| Once a lease is broken, it cannot be renewed. Any authorized request can break the lease;
| the request is not required to specify a matching lease ID. When a lease
| is broken, the lease break period is allowed to elapse, during which time
| no lease operation except break and release can be performed on the container or blob.
| When a lease is successfully broken, the response indicates the interval
| in seconds until a new lease can be acquired.
|
| :param int lease_break_period:
| This is the proposed duration of seconds that the lease
| should continue before it is broken, between 0 and 60 seconds. This
| break period is only used if it is shorter than the time remaining
| on the lease. If longer, the time remaining on the lease is used.
| A new lease will not be available before the break period has
| expired, but the lease may be held for longer than the break
| period. If this header does not appear with a break
| operation, a fixed-duration lease breaks after the remaining lease
| period elapses, and an infinite lease breaks immediately.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Approximate time remaining in the lease period, in seconds.
| :rtype: int
|
| change(self, proposed_lease_id: str, **kwargs: Any) -> None
| Change the lease ID of an active lease.
|
| :param str proposed_lease_id:
| Proposed lease ID, in a GUID string format. The Blob service returns 400
| (Invalid request) if the proposed lease ID is not in the correct format.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
|
| release(self, **kwargs: Any) -> None
| Release the lease.
|
| The lease may be released if the client lease id specified matches
| that associated with the container or blob. Releasing the lease allows another client
| to immediately acquire the lease for the container or blob as soon as the release is complete.
|
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
|
| renew(self, **kwargs: Any) -> None
| Renews the lease.
|
| The lease can be renewed if the lease ID specified in the
| lease client matches that associated with the container or blob. Note that
| the lease may be renewed even if it has expired as long as the container
| or blob has not been leased again since the expiration of that lease. When you
| renew a lease, the lease duration clock resets.
|
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'etag': typing.Optional[str], 'id': <class 'str'>, ...
azure-storage-blob.BlobPrefix
Python Library Documentation: class BlobPrefix in module azure.storage.blob._list_blobs_helper
class BlobPrefix(azure.core.paging.ItemPaged, azure.storage.blob._shared.models.DictMixin)
| BlobPrefix(*args: Any, **kwargs: Any) -> None
|
| An Iterable of Blob properties.
|
| Returned from walk_blobs when a delimiter is used.
| Can be thought of as a virtual blob directory.
|
| Method resolution order:
| BlobPrefix
| azure.core.paging.ItemPaged
| collections.abc.Iterator
| collections.abc.Iterable
| typing.Generic
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args: Any, **kwargs: Any) -> None
| Return an iterator of items.
|
| args and kwargs will be passed to the PageIterator constructor directly,
| except page_iterator_class
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {'command': typing.Callable, 'container': <class 'st...
|
| __parameters__ = ()
|
| ----------------------------------------------------------------------
| Methods inherited from azure.core.paging.ItemPaged:
|
| __iter__(self) -> Iterator[~ReturnType]
|
| __next__(self) -> ~ReturnType
| Get the next item in the iterator.
|
| :returns: The next item in the iterator.
| :rtype: ReturnType
| :raises StopIteration: If there are no more items to return.
|
| __repr__(self) -> str
| Return repr(self).
|
| by_page(self, continuation_token: Optional[str] = None) -> Iterator[Iterator[~ReturnType]]
| Get an iterator of pages of objects, instead of an iterator of objects.
|
| :param str continuation_token:
| An opaque continuation token. This value can be retrieved from the
| continuation_token field of a previous generator object. If specified,
| this generator will begin returning results from this point.
| :returns: An iterator of pages (themselves iterator of objects)
| :rtype: iterator[iterator[ReturnType]]
|
| next = __next__(self) -> ~ReturnType
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.core.paging.ItemPaged:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.core.paging.ItemPaged:
|
| __orig_bases__ = (typing.Iterator[~ReturnType],)
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterator:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __init_subclass__(...)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.BlobProperties
Python Library Documentation: class BlobProperties in module azure.storage.blob._models
class BlobProperties(azure.storage.blob._shared.models.DictMixin)
| BlobProperties(**kwargs: Any) -> None
|
| Blob Properties.
|
| Method resolution order:
| BlobProperties
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'append_blob_committed_block_count': typing.Optiona...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.BlobQueryError
Python Library Documentation: class BlobQueryError in module azure.storage.blob._models
class BlobQueryError(builtins.object)
| BlobQueryError(error: Optional[str] = None, is_fatal: bool = False, description: Optional[str] = None, position: Optional[int] = None) -> None
|
| The error happened during quick query operation.
|
| Methods defined here:
|
| __init__(self, error: Optional[str] = None, is_fatal: bool = False, description: Optional[str] = None, position: Optional[int] = None) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'description': typing.Optional[str], 'error': typin...
azure-storage-blob.BlobQueryReader
Python Library Documentation: class BlobQueryReader in module azure.storage.blob._quick_query_helper
class BlobQueryReader(builtins.object)
| BlobQueryReader(name: str = None, container: str = None, errors: Any = None, record_delimiter: str = '\n', encoding: Optional[str] = None, headers: Dict[str, Any] = None, response: Any = None, error_cls: Type[ForwardRef('BlobQueryError')] = None) -> None
|
| A streaming object to read query results.
|
| Methods defined here:
|
| __init__(self, name: str = None, container: str = None, errors: Any = None, record_delimiter: str = '\n', encoding: Optional[str] = None, headers: Dict[str, Any] = None, response: Any = None, error_cls: Type[ForwardRef('BlobQueryError')] = None) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __len__(self) -> int
|
| readall(self) -> bytes
| Return all query results.
|
| This operation is blocking until all data is downloaded.
|
| :return: The query results.
| :rtype: bytes
|
| readinto(self, stream: <class 'IO'>) -> None
| Download the query result to a stream.
|
| :param IO stream:
| The stream to download to. This can be an open file-handle,
| or any writable stream.
| :return: None
|
| records(self) -> Iterable[bytes]
| Returns a record generator for the query result.
|
| Records will be returned line by line.
|
| :return: A record generator for the query result.
| :rtype: Iterable[bytes]
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'container': <class 'str'>, 'name': <class 'str'>, ...
azure-storage-blob.BlobSasPermissions
Python Library Documentation: class BlobSasPermissions in module azure.storage.blob._models
class BlobSasPermissions(builtins.object)
| BlobSasPermissions(read: bool = False, add: bool = False, create: bool = False, write: bool = False, delete: bool = False, delete_previous_version: bool = False, tag: bool = False, **kwargs: Any) -> None
|
| BlobSasPermissions class to be used with the
| :func:`~azure.storage.blob.generate_blob_sas` function.
|
| :param bool read:
| Read the content, properties, metadata and block list. Use the blob as
| the source of a copy operation.
| :param bool add:
| Add a block to an append blob.
| :param bool create:
| Write a new blob, snapshot a blob, or copy a blob to a new blob.
| :param bool write:
| Create or write content, properties, metadata, or block list. Snapshot
| or lease the blob. Resize the blob (page blob only). Use the blob as the
| destination of a copy operation within the same account.
| :param bool delete:
| Delete the blob.
| :param bool delete_previous_version:
| Delete the previous blob version for the versioning enabled storage account.
| :param bool tag:
| Set or get tags on the blob.
| :keyword bool permanent_delete:
| To enable permanent delete on the blob is permitted.
| :keyword bool move:
| Move a blob or a directory and its contents to a new location.
| :keyword bool execute:
| Get the system properties and, if the hierarchical namespace is enabled for the storage account,
| get the POSIX ACL of a blob.
| :keyword bool set_immutability_policy:
| To enable operations related to set/delete immutability policy.
| To get immutability policy, you just need read permission.
|
| Methods defined here:
|
| __init__(self, read: bool = False, add: bool = False, create: bool = False, write: bool = False, delete: bool = False, delete_previous_version: bool = False, tag: bool = False, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_string(permission: str) -> 'BlobSasPermissions'
| Create a BlobSasPermissions from a string.
|
| To specify read, add, create, write, or delete permissions you need only to
| include the first letter of the word in the string. E.g. For read and
| write permissions, you would provide a string "rw".
|
| :param str permission: The string which dictates the read, add, create,
| write, or delete permissions.
| :return: A BlobSasPermissions object
| :rtype: ~azure.storage.blob.BlobSasPermissions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'add': typing.Optional[bool], 'create': typing.Opti...
|
| delete = False
|
| delete_previous_version = False
|
| read = False
|
| tag = False
|
| write = False
azure-storage-blob.BlobServiceClient
Python Library Documentation: class BlobServiceClient in module azure.storage.blob._blob_service_client
class BlobServiceClient(azure.storage.blob._shared.base_client.StorageAccountHostsMixin, azure.storage.blob._encryption.StorageEncryptionMixin)
| BlobServiceClient(account_url: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
|
| A client to interact with the Blob Service at the account level.
|
| This client provides operations to retrieve and configure the account properties
| as well as list, create and delete containers within the account.
| For operations relating to a specific container or blob, clients for those entities
| can also be retrieved using the `get_client` functions.
|
| For more optional configuration, please click
| `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #optional-configuration>`__.
|
| :param str account_url:
| The URL to the blob storage account. Any other entities included
| in the URL path (e.g. container or blob) will be discarded. This URL can be optionally
| authenticated with a SAS token.
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
| - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :keyword str api_version:
| The Storage API version to use for requests. Default value is the most recent service version that is
| compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.
|
| .. versionadded:: 12.2.0
|
| :keyword str secondary_hostname:
| The hostname of the secondary endpoint.
| :keyword int max_block_size: The maximum chunk size for uploading a block blob in chunks.
| Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_put_size: If the blob size is less than or equal max_single_put_size, then the blob will be
| uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
| the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.
| :keyword int min_large_block_upload_threshold: The minimum chunk size required to use the memory efficient
| algorithm when uploading a block blob. Defaults to 4*1024*1024+1.
| :keyword bool use_byte_buffer: Use a byte buffer for block blob uploads. Defaults to False.
| :keyword int max_page_size: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_get_size: The maximum size for a blob to be downloaded in a single call,
| the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.
| :keyword int max_chunk_get_size: The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024,
| or 4MB.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START create_blob_service_client]
| :end-before: [END create_blob_service_client]
| :language: python
| :dedent: 8
| :caption: Creating the BlobServiceClient with account url and credential.
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START create_blob_service_client_oauth]
| :end-before: [END create_blob_service_client_oauth]
| :language: python
| :dedent: 8
| :caption: Creating the BlobServiceClient with Default Azure Identity credentials.
|
| Method resolution order:
| BlobServiceClient
| azure.storage.blob._shared.base_client.StorageAccountHostsMixin
| azure.storage.blob._encryption.StorageEncryptionMixin
| builtins.object
|
| Methods defined here:
|
| __enter__(self) -> Self
|
| __exit__(self, *args) -> None
|
| __init__(self, account_url: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| close(self) -> None
| This method is to close the sockets opened by the client.
| It need not be used when using with a context manager.
|
| :return: None
| :rtype: None
|
| create_container(self, name: str, metadata: Optional[Dict[str, str]] = None, public_access: Union[ForwardRef('PublicAccess'), str, NoneType] = None, **kwargs: Any) -> azure.storage.blob._container_client.ContainerClient
| Creates a new container under the specified account.
|
| If the container with the same name already exists, a ResourceExistsError will
| be raised. This method returns a client with which to interact with the newly
| created container.
|
| :param str name: The name of the container to create.
| :param metadata:
| A dict with name-value pairs to associate with the
| container as metadata. Example: `{'Category':'test'}`
| :type metadata: Dict[str, str]
| :param public_access:
| Possible values include: 'container', 'blob'.
| :type public_access: str or ~azure.storage.blob.PublicAccess
| :keyword container_encryption_scope:
| Specifies the default encryption scope to set on the container and use for
| all future writes.
|
| .. versionadded:: 12.2.0
|
| :paramtype container_encryption_scope: dict or ~azure.storage.blob.ContainerEncryptionScope
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A container client to interact with the newly created container.
| :rtype: ~azure.storage.blob.ContainerClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START bsc_create_container]
| :end-before: [END bsc_create_container]
| :language: python
| :dedent: 12
| :caption: Creating a container in the blob service.
|
| delete_container(self, container: Union[azure.storage.blob._models.ContainerProperties, str], lease: Union[ForwardRef('BlobLeaseClient'), str, NoneType] = None, **kwargs: Any) -> None
| Marks the specified container for deletion.
|
| The container and any blobs contained within it are later deleted during garbage collection.
| If the container is not found, a ResourceNotFoundError will be raised.
|
| :param container:
| The container to delete. This can either be the name of the container,
| or an instance of ContainerProperties.
| :type container: str or ~azure.storage.blob.ContainerProperties
| :param lease:
| If specified, delete_container only succeeds if the
| container's lease is active and matches this ID.
| Required if the container has an active lease.
| :type lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START bsc_delete_container]
| :end-before: [END bsc_delete_container]
| :language: python
| :dedent: 12
| :caption: Deleting a container in the blob service.
|
| find_blobs_by_tags(self, filter_expression: str, **kwargs: Any) -> azure.core.paging.ItemPaged['FilteredBlob']
| The Filter Blobs operation enables callers to list blobs across all
| containers whose tags match a given search expression. Filter blobs
| searches across all containers within a storage account but can be
| scoped within the expression to a single container.
|
| :param str filter_expression:
| The expression to find blobs whose tags matches the specified condition.
| eg. ""yourtagname"='firsttag' and "yourtagname2"='secondtag'"
| To specify a container, eg. "@container='containerName' and "Name"='C'"
| :keyword int results_per_page:
| The max result per page when paginating.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) response of BlobProperties.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.FilteredBlob]
|
| get_account_information(self, **kwargs: Any) -> Dict[str, str]
| Gets information related to the storage account.
|
| The information can also be retrieved if the user has a SAS to a container or blob.
| The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
| :return: A dict of account information (SKU and account type).
| :rtype: Dict[str, str]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START get_blob_service_account_info]
| :end-before: [END get_blob_service_account_info]
| :language: python
| :dedent: 8
| :caption: Getting account information for the blob service.
|
| get_blob_client(self, container: Union[azure.storage.blob._models.ContainerProperties, str], blob: str, snapshot: Union[str, Dict[str, Any], NoneType] = None, *, version_id: Optional[str] = None) -> azure.storage.blob._blob_client.BlobClient
| Get a client to interact with the specified blob.
|
| The blob need not already exist.
|
| :param container:
| The container that the blob is in. This can either be the name of the container,
| or an instance of ContainerProperties.
| :type container: str or ~azure.storage.blob.ContainerProperties
| :param str blob: The name of the blob with which to interact.
| :param snapshot:
| The optional blob snapshot on which to operate. This can either be the ID of the snapshot,
| or a dictionary output returned by :func:`~azure.storage.blob.BlobClient.create_snapshot()`.
| :type snapshot: str or Dict[str, Any]
| :keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
| specifies the version of the blob to operate on.
| :return: A BlobClient.
| :rtype: ~azure.storage.blob.BlobClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START bsc_get_blob_client]
| :end-before: [END bsc_get_blob_client]
| :language: python
| :dedent: 12
| :caption: Getting the blob client to interact with a specific blob.
|
| get_container_client(self, container: Union[azure.storage.blob._models.ContainerProperties, str]) -> azure.storage.blob._container_client.ContainerClient
| Get a client to interact with the specified container.
|
| The container need not already exist.
|
| :param container:
| The container. This can either be the name of the container,
| or an instance of ContainerProperties.
| :type container: str or ~azure.storage.blob.ContainerProperties
| :return: A ContainerClient.
| :rtype: ~azure.storage.blob.ContainerClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START bsc_get_container_client]
| :end-before: [END bsc_get_container_client]
| :language: python
| :dedent: 8
| :caption: Getting the container client to interact with a specific container.
|
| get_service_properties(self, **kwargs: Any) -> Dict[str, Any]
| Gets the properties of a storage account's Blob service, including
| Azure Storage Analytics.
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An object containing blob service properties such as
| analytics logging, hour/minute metrics, cors rules, etc.
| :rtype: Dict[str, Any]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START get_blob_service_properties]
| :end-before: [END get_blob_service_properties]
| :language: python
| :dedent: 8
| :caption: Getting service properties for the blob service.
|
| get_service_stats(self, **kwargs: Any) -> Dict[str, Any]
| Retrieves statistics related to replication for the Blob service.
|
| It is only available when read-access geo-redundant replication is enabled for
| the storage account.
|
| With geo-redundant replication, Azure Storage maintains your data durable
| in two locations. In both locations, Azure Storage constantly maintains
| multiple healthy replicas of your data. The location where you read,
| create, update, or delete data is the primary storage account location.
| The primary location exists in the region you choose at the time you
| create an account via the Azure Management Azure classic portal, for
| example, North Central US. The location to which your data is replicated
| is the secondary location. The secondary location is automatically
| determined based on the location of the primary; it is in a second data
| center that resides in the same region as the primary location. Read-only
| access is available from the secondary location, if read-access geo-redundant
| replication is enabled for your storage account.
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: The blob service stats.
| :rtype: Dict[str, Any]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START get_blob_service_stats]
| :end-before: [END get_blob_service_stats]
| :language: python
| :dedent: 8
| :caption: Getting service stats for the blob service.
|
| get_user_delegation_key(self, key_start_time: 'datetime', key_expiry_time: 'datetime', *, delegated_user_tid: Optional[str] = None, **kwargs: Any) -> 'UserDelegationKey'
| Obtain a user delegation key for the purpose of signing SAS tokens.
| A token credential must be present on the service object for this request to succeed.
|
| :param ~datetime.datetime key_start_time:
| A DateTime value. Indicates when the key becomes valid.
| :param ~datetime.datetime key_expiry_time:
| A DateTime value. Indicates when the key stops being valid.
| :keyword str delegated_user_tid: The delegated user tenant id in Entra ID.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: The user delegation key.
| :rtype: ~azure.storage.blob.UserDelegationKey
|
| list_containers(self, name_starts_with: Optional[str] = None, include_metadata: bool = False, **kwargs: Any) -> azure.core.paging.ItemPaged[azure.storage.blob._models.ContainerProperties]
| Returns a generator to list the containers under the specified account.
|
| The generator will lazily follow the continuation tokens returned by
| the service and stop when all containers have been returned.
|
| :param str name_starts_with:
| Filters the results to return only containers whose names
| begin with the specified prefix.
| :param bool include_metadata:
| Specifies that container metadata to be returned in the response.
| The default value is `False`.
| :keyword bool include_deleted:
| Specifies that deleted containers to be returned in the response. This is for container restore enabled
| account. The default value is `False`.
| .. versionadded:: 12.4.0
| :keyword bool include_system:
| Flag specifying that system containers should be included.
| .. versionadded:: 12.10.0
| :keyword int results_per_page:
| The maximum number of container names to retrieve per API
| call. If the request does not specify the server will return up to 5,000 items.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) of ContainerProperties.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.ContainerProperties]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START bsc_list_containers]
| :end-before: [END bsc_list_containers]
| :language: python
| :dedent: 12
| :caption: Listing the containers in the blob service.
|
| set_service_properties(self, analytics_logging: Optional[ForwardRef('BlobAnalyticsLogging')] = None, hour_metrics: Optional[ForwardRef('Metrics')] = None, minute_metrics: Optional[ForwardRef('Metrics')] = None, cors: Optional[List[azure.storage.blob._models.CorsRule]] = None, target_version: Optional[str] = None, delete_retention_policy: Optional[ForwardRef('RetentionPolicy')] = None, static_website: Optional[ForwardRef('StaticWebsite')] = None, **kwargs: Any) -> None
| Sets the properties of a storage account's Blob service, including
| Azure Storage Analytics.
|
| If an element (e.g. analytics_logging) is left as None, the
| existing settings on the service for that functionality are preserved.
|
| :param analytics_logging:
| Groups the Azure Analytics Logging settings.
| :type analytics_logging: ~azure.storage.blob.BlobAnalyticsLogging
| :param hour_metrics:
| The hour metrics settings provide a summary of request
| statistics grouped by API in hourly aggregates for blobs.
| :type hour_metrics: ~azure.storage.blob.Metrics
| :param minute_metrics:
| The minute metrics settings provide request statistics
| for each minute for blobs.
| :type minute_metrics: ~azure.storage.blob.Metrics
| :param cors:
| You can include up to five CorsRule elements in the
| list. If an empty list is specified, all CORS rules will be deleted,
| and CORS will be disabled for the service.
| :type cors: list[~azure.storage.blob.CorsRule]
| :param str target_version:
| Indicates the default version to use for requests if an incoming
| request's version is not specified.
| :param delete_retention_policy:
| The delete retention policy specifies whether to retain deleted blobs.
| It also specifies the number of days and versions of blob to keep.
| :type delete_retention_policy: ~azure.storage.blob.RetentionPolicy
| :param static_website:
| Specifies whether the static website feature is enabled,
| and if yes, indicates the index document and 404 error document to use.
| :type static_website: ~azure.storage.blob.StaticWebsite
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_service.py
| :start-after: [START set_blob_service_properties]
| :end-before: [END set_blob_service_properties]
| :language: python
| :dedent: 8
| :caption: Setting service properties for the blob service.
|
| undelete_container(self, deleted_container_name: str, deleted_container_version: str, **kwargs: Any) -> azure.storage.blob._container_client.ContainerClient
| Restores soft-deleted container.
|
| Operation will only be successful if used within the specified number of days
| set in the delete retention policy.
|
| .. versionadded:: 12.4.0
| This operation was introduced in API version '2019-12-12'.
|
| :param str deleted_container_name:
| Specifies the name of the deleted container to restore.
| :param str deleted_container_version:
| Specifies the version of the deleted container to restore.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: The undeleted ContainerClient.
| :rtype: ~azure.storage.blob.ContainerClient
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_connection_string(conn_str: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> Self
| Create BlobServiceClient from a Connection String.
|
| :param str conn_str:
| A connection string to an Azure Storage account.
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token, or the connection string already has shared
| access key values. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| Credentials provided here will take precedence over those in the connection string.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :type credential:
| ~azure.core.credentials.AzureNamedKeyCredential or
| ~azure.core.credentials.AzureSasCredential or
| ~azure.core.credentials.TokenCredential or
| str or dict[str, str] or None
| :keyword str api_version:
| The Storage API version to use for requests. Default value is the most recent service version that is
| compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.
|
| .. versionadded:: 12.2.0
|
| :keyword str secondary_hostname:
| The hostname of the secondary endpoint.
| :keyword int max_block_size: The maximum chunk size for uploading a block blob in chunks.
| Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_put_size: If the blob size is less than or equal max_single_put_size, then the blob will
| be uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
| the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.
| :keyword int min_large_block_upload_threshold: The minimum chunk size required to use the memory efficient
| algorithm when uploading a block blob. Defaults to 4*1024*1024+1.
| :keyword bool use_byte_buffer: Use a byte buffer for block blob uploads. Defaults to False.
| :keyword int max_page_size: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_get_size: The maximum size for a blob to be downloaded in a single call,
| the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.
| :keyword int max_chunk_get_size: The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024,
| or 4MB.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
| :return: A Blob service client.
| :rtype: ~azure.storage.blob.BlobServiceClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START auth_from_connection_string]
| :end-before: [END auth_from_connection_string]
| :language: python
| :dedent: 8
| :caption: Creating the BlobServiceClient from a connection string.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Readonly properties inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| api_version
| The version of the Storage API used for requests.
|
| :rtype: str
|
| primary_endpoint
| The full primary endpoint URL.
|
| :return: The full primary endpoint URL.
| :rtype: str
|
| primary_hostname
| The hostname of the primary endpoint.
|
| :return: The hostname of the primary endpoint.
| :rtype: str
|
| secondary_endpoint
| The full secondary endpoint URL if configured.
|
| If not available a ValueError will be raised. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The full secondary endpoint URL.
| :rtype: str
| :raise ValueError: If no secondary endpoint is configured.
|
| secondary_hostname
| The hostname of the secondary endpoint.
|
| If not available this will be None. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The hostname of the secondary endpoint, or None if not configured.
| :rtype: Optional[str]
|
| url
| The full endpoint URL to this entity, including SAS token if used.
|
| This could be either the primary endpoint,
| or the secondary endpoint depending on the current :func:`location_mode`.
|
| :return: The full endpoint URL to this entity, including SAS token if used.
| :rtype: str
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| location_mode
| The location mode that the client is currently using.
|
| By default this will be "primary". Options include "primary" and "secondary".
|
| :return: The current location mode.
| :rtype: str
azure-storage-blob.BlobType
Python Library Documentation: class BlobType in module azure.storage.blob._models
class BlobType(builtins.str, enum.Enum)
| BlobType(*values)
|
| Method resolution order:
| BlobType
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| APPENDBLOB = <BlobType.APPENDBLOB: 'AppendBlob'>
|
| BLOCKBLOB = <BlobType.BLOCKBLOB: 'BlockBlob'>
|
| PAGEBLOB = <BlobType.PAGEBLOB: 'PageBlob'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.BlockState
Python Library Documentation: class BlockState in module azure.storage.blob._models
class BlockState(builtins.str, enum.Enum)
| BlockState(*values)
|
| Block blob block types.
|
| Method resolution order:
| BlockState
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| COMMITTED = <BlockState.COMMITTED: 'Committed'>
|
| LATEST = <BlockState.LATEST: 'Latest'>
|
| UNCOMMITTED = <BlockState.UNCOMMITTED: 'Uncommitted'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.ContainerClient
Python Library Documentation: class ContainerClient in module azure.storage.blob._container_client
class ContainerClient(azure.storage.blob._shared.base_client.StorageAccountHostsMixin, azure.storage.blob._encryption.StorageEncryptionMixin)
| ContainerClient(account_url: str, container_name: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
|
| A client to interact with a specific container, although that container
| may not yet exist.
|
| For operations relating to a specific blob within this container, a blob client can be
| retrieved using the :func:`~get_blob_client` function.
|
| For more optional configuration, please click
| `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #optional-configuration>`__.
|
| :param str account_url:
| The URI to the storage account. In order to create a client given the full URI to the container,
| use the :func:`from_container_url` classmethod.
| :param container_name:
| The name of the container for the blob.
| :type container_name: str
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
| - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :keyword str api_version:
| The Storage API version to use for requests. Default value is the most recent service version that is
| compatible with the current SDK. Setting to an older version may result in reduced feature compatibility.
|
| .. versionadded:: 12.2.0
|
| :keyword str secondary_hostname:
| The hostname of the secondary endpoint.
| :keyword int max_block_size: The maximum chunk size for uploading a block blob in chunks.
| Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_put_size: If the blob size is less than or equal max_single_put_size, then the blob will be
| uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
| the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.
| :keyword int min_large_block_upload_threshold: The minimum chunk size required to use the memory efficient
| algorithm when uploading a block blob. Defaults to 4*1024*1024+1.
| :keyword bool use_byte_buffer: Use a byte buffer for block blob uploads. Defaults to False.
| :keyword int max_page_size: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024, or 4MB.
| :keyword int max_single_get_size: The maximum size for a blob to be downloaded in a single call,
| the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.
| :keyword int max_chunk_get_size: The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024,
| or 4MB.
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START create_container_client_from_service]
| :end-before: [END create_container_client_from_service]
| :language: python
| :dedent: 8
| :caption: Get a ContainerClient from an existing BlobServiceClient.
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START create_container_client_sasurl]
| :end-before: [END create_container_client_sasurl]
| :language: python
| :dedent: 8
| :caption: Creating the container client directly.
|
| Method resolution order:
| ContainerClient
| azure.storage.blob._shared.base_client.StorageAccountHostsMixin
| azure.storage.blob._encryption.StorageEncryptionMixin
| builtins.object
|
| Methods defined here:
|
| __enter__(self) -> Self
|
| __exit__(self, *args) -> None
|
| __init__(self, account_url: str, container_name: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| acquire_lease(self, lease_duration: int = -1, lease_id: Optional[str] = None, **kwargs: Any) -> azure.storage.blob._lease.BlobLeaseClient
| Requests a new lease. If the container does not have an active lease,
| the Blob service creates a lease on the container and returns a new
| lease ID.
|
| :param int lease_duration:
| Specifies the duration of the lease, in seconds, or negative one
| (-1) for a lease that never expires. A non-infinite lease can be
| between 15 and 60 seconds. A lease duration cannot be changed
| using renew or change. Default is -1 (infinite lease).
| :param str lease_id:
| Proposed lease ID, in a GUID string format. The Blob service returns
| 400 (Invalid request) if the proposed lease ID is not in the correct format.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A BlobLeaseClient object, that can be run in a context manager.
| :rtype: ~azure.storage.blob.BlobLeaseClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START acquire_lease_on_container]
| :end-before: [END acquire_lease_on_container]
| :language: python
| :dedent: 8
| :caption: Acquiring a lease on the container.
|
| close(self) -> None
| This method is to close the sockets opened by the client.
| It need not be used when using with a context manager.
|
| :return: None
| :rtype: None
|
| create_container(self, metadata: Optional[Dict[str, str]] = None, public_access: Union[ForwardRef('PublicAccess'), str, NoneType] = None, **kwargs: Any) -> Dict[str, Union[str, ForwardRef('datetime')]]
| Creates a new container under the specified account. If the container
| with the same name already exists, the operation fails.
|
| :param metadata:
| A dict with name_value pairs to associate with the
| container as metadata. Example:{'Category':'test'}
| :type metadata: dict[str, str]
| :param ~azure.storage.blob.PublicAccess public_access:
| Possible values include: 'container', 'blob'.
| :keyword container_encryption_scope:
| Specifies the default encryption scope to set on the container and use for
| all future writes.
|
| .. versionadded:: 12.2.0
|
| :paramtype container_encryption_scope: dict or ~azure.storage.blob.ContainerEncryptionScope
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: A dictionary of response headers.
| :rtype: Dict[str, Union[str, datetime]]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START create_container]
| :end-before: [END create_container]
| :language: python
| :dedent: 12
| :caption: Creating a container to store blobs.
|
| delete_blob(self, blob: str, delete_snapshots: Optional[str] = None, **kwargs: Any) -> None
| Marks the specified blob or snapshot for deletion.
|
| The blob is later deleted during garbage collection.
| Note that in order to delete a blob, you must delete all of its
| snapshots. You can delete both at the same time with the delete_blob
| operation.
|
| If a delete retention policy is enabled for the service, then this operation soft deletes the blob or snapshot
| and retains the blob or snapshot for specified number of days.
| After specified number of days, blob's data is removed from the service during garbage collection.
| Soft deleted blob or snapshot is accessible through :func:`list_blobs()` specifying `include=["deleted"]`
| option. Soft-deleted blob or snapshot can be restored using
| :func:`~azure.storage.blob.BlobClient.undelete_blob()`
|
| :param str blob: The blob with which to interact.
| :param str delete_snapshots:
| Required if the blob has associated snapshots. Values include:
| - "only": Deletes only the blobs snapshots.
| - "include": Deletes the blob along with all snapshots.
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to delete.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
|
| :keyword lease:
| Required if the blob has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| delete_blobs(self, *blobs: Union[str, Dict[str, Any], azure.storage.blob._models.BlobProperties], **kwargs: Any) -> Iterator[ForwardRef('HttpResponse')]
| Marks the specified blobs or snapshots for deletion.
|
| The blobs are later deleted during garbage collection.
| Note that in order to delete blobs, you must delete all of their
| snapshots. You can delete both at the same time with the delete_blobs operation.
|
| If a delete retention policy is enabled for the service, then this operation soft deletes the blobs or snapshots
| and retains the blobs or snapshots for specified number of days.
| After specified number of days, blobs' data is removed from the service during garbage collection.
| Soft deleted blobs or snapshots are accessible through :func:`list_blobs()` specifying `include=["deleted"]`
| Soft-deleted blobs or snapshots can be restored using :func:`~azure.storage.blob.BlobClient.undelete_blob()`
|
| The maximum number of blobs that can be deleted in a single request is 256.
|
| :param blobs:
| The blobs to delete. This can be a single blob, or multiple values can
| be supplied, where each value is either the name of the blob (str) or BlobProperties.
|
| .. note::
| When the blob type is dict, here's a list of keys, value rules.
|
| blob name:
| key: 'name', value type: str
| snapshot you want to delete:
| key: 'snapshot', value type: str
| version id:
| key: 'version_id', value type: str
| whether to delete snapshots when deleting blob:
| key: 'delete_snapshots', value: 'include' or 'only'
| if the blob modified or not:
| key: 'if_modified_since', 'if_unmodified_since', value type: datetime
| etag:
| key: 'etag', value type: str
| match the etag or not:
| key: 'match_condition', value type: MatchConditions
| tags match condition:
| key: 'if_tags_match_condition', value type: str
| lease:
| key: 'lease_id', value type: Union[str, LeaseClient]
| timeout for subrequest:
| key: 'timeout', value type: int
|
| :type blobs: Union[str, Dict[str, Any], BlobProperties]
| :keyword str delete_snapshots:
| Required if a blob has associated snapshots. Values include:
| - "only": Deletes only the blobs snapshots.
| - "include": Deletes the blob along with all snapshots.
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword bool raise_on_any_failure:
| This is a boolean param which defaults to True. When this is set, an exception
| is raised even if there is a single operation failure.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterator of responses, one for each blob in order
| :rtype: Iterator[~azure.core.pipeline.transport.HttpResponse]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_common.py
| :start-after: [START delete_multiple_blobs]
| :end-before: [END delete_multiple_blobs]
| :language: python
| :dedent: 8
| :caption: Deleting multiple blobs.
|
| delete_container(self, **kwargs: Any) -> None
| Marks the specified container for deletion. The container and any blobs
| contained within it are later deleted during garbage collection.
|
| :keyword lease:
| If specified, delete_container only succeeds if the
| container's lease is active and matches this ID.
| Required if the container has an active lease.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: None
| :rtype: None
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START delete_container]
| :end-before: [END delete_container]
| :language: python
| :dedent: 12
| :caption: Delete a container.
|
| download_blob(self, blob: str, offset: Optional[int] = None, length: Optional[int] = None, *, encoding: Optional[str] = None, **kwargs: Any) -> Union[azure.storage.blob._download.StorageStreamDownloader[str], azure.storage.blob._download.StorageStreamDownloader[bytes]]
| Downloads a blob to the StorageStreamDownloader. The readall() method must
| be used to read all the content or readinto() must be used to download the blob into
| a stream. Using chunks() returns an iterator which allows the user to iterate over the content in chunks.
|
| :param str blob: The blob with which to interact.
| :param int offset:
| Start of byte range to use for downloading a section of the blob.
| Must be set if length is provided.
| :param int length:
| Number of bytes to read from the stream. This is optional, but
| should be supplied for optimal performance.
| :keyword str version_id:
| The version id parameter is an opaque DateTime
| value that, when present, specifies the version of the blob to download.
|
| .. versionadded:: 12.4.0
|
| This keyword argument was introduced in API version '2019-12-12'.
|
| :keyword bool validate_content:
| If true, calculates an MD5 hash for each chunk of the blob. The storage
| service checks the hash of the content that has arrived with the hash
| that was sent. This is primarily valuable for detecting bitflips on
| the wire if using http instead of https, as https (the default), will
| already validate. Note that this MD5 hash is not stored with the
| blob. Also note that if enabled, the memory-efficient upload algorithm
| will not be used because computing the MD5 hash requires buffering
| entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
| :keyword lease:
| Required if the blob has an active lease. If specified, download_blob only
| succeeds if the blob's lease is active and matches this ID. Value can be a
| BlobLeaseClient object or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword int max_concurrency:
| The number of parallel connections with which to download.
| :keyword str encoding:
| Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
| :keyword progress_hook:
| A callback to track the progress of a long running download. The signature is
| function(current: int, total: int) where current is the number of bytes transferred
| so far, and total is the total size of the download.
| :paramtype progress_hook: Callable[[int, int], None]
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
| the timeout will apply to each call individually.
| multiple calls to the Azure service and the timeout will apply to
| each call individually.
| :return: A streaming object (StorageStreamDownloader)
| :rtype: ~azure.storage.blob.StorageStreamDownloader
|
| exists(self, **kwargs: Any) -> bool
| Returns True if a container exists and returns False otherwise.
|
| :kwarg int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: boolean
| :rtype: bool
|
| find_blobs_by_tags(self, filter_expression: str, **kwargs: Any) -> azure.core.paging.ItemPaged[azure.storage.blob._models.FilteredBlob]
| Returns a generator to list the blobs under the specified container whose tags
| match the given search expression.
| The generator will lazily follow the continuation tokens returned by
| the service.
|
| :param str filter_expression:
| The expression to find blobs whose tags matches the specified condition.
| eg. ""yourtagname"='firsttag' and "yourtagname2"='secondtag'"
| :keyword int results_per_page:
| The max result per page when paginating.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) response of FilteredBlob.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
| get_account_information(self, **kwargs: Any) -> Dict[str, str]
| Gets information related to the storage account.
|
| The information can also be retrieved if the user has a SAS to a container or blob.
| The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
| :return: A dict of account information (SKU and account type).
| :rtype: dict(str, str)
|
| get_blob_client(self, blob: str, snapshot: Optional[str] = None, *, version_id: Optional[str] = None) -> azure.storage.blob._blob_client.BlobClient
| Get a client to interact with the specified blob.
|
| The blob need not already exist.
|
| :param str blob:
| The blob with which to interact.
| :param str snapshot:
| The optional blob snapshot on which to operate. This can be the snapshot ID string
| or the response returned from :func:`~BlobClient.create_snapshot()`.
| :keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
| specifies the version of the blob to operate on.
| :return: A BlobClient.
| :rtype: ~azure.storage.blob.BlobClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START get_blob_client]
| :end-before: [END get_blob_client]
| :language: python
| :dedent: 8
| :caption: Get the blob client.
|
| get_container_access_policy(self, **kwargs: Any) -> Dict[str, Any]
| Gets the permissions for the specified container.
| The permissions indicate whether container data may be accessed publicly.
|
| :keyword lease:
| If specified, get_container_access_policy only succeeds if the
| container's lease is active and matches this ID.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Access policy information in a dict.
| :rtype: dict[str, Any]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START get_container_access_policy]
| :end-before: [END get_container_access_policy]
| :language: python
| :dedent: 12
| :caption: Getting the access policy on the container.
|
| get_container_properties(self, **kwargs: Any) -> azure.storage.blob._models.ContainerProperties
| Returns all user-defined metadata and system properties for the specified
| container. The data returned does not include the container's list of blobs.
|
| :keyword lease:
| If specified, get_container_properties only succeeds if the
| container's lease is active and matches this ID.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Properties for the specified container within a container object.
| :rtype: ~azure.storage.blob.ContainerProperties
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START get_container_properties]
| :end-before: [END get_container_properties]
| :language: python
| :dedent: 12
| :caption: Getting properties on the container.
|
| list_blob_names(self, **kwargs: Any) -> azure.core.paging.ItemPaged[str]
| Returns a generator to list the names of blobs under the specified container.
| The generator will lazily follow the continuation tokens returned by
| the service.
|
| Note that no additional properties or metadata will be returned when using this API.
| Additionally, this API does not have an option to include additional blobs such as snapshots,
| versions, soft-deleted blobs, etc. To get any of this data, use :func:`list_blobs()`.
|
| :keyword str name_starts_with:
| Filters the results to return only blobs whose names
| begin with the specified prefix.
| :keyword int results_per_page:
| Controls the maximum number of Blobs that will be included in each page of results if using
| `ItemPaged.by_page()`.
| :keyword str start_from:
| Specifies the full path (inclusive) to list paths from.
| Only one entity level is supported.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) response of blob names as strings.
| :rtype: ~azure.core.paging.ItemPaged[str]
|
| list_blobs(self, name_starts_with: Optional[str] = None, include: Union[str, List[str], NoneType] = None, **kwargs: Any) -> azure.core.paging.ItemPaged[azure.storage.blob._models.BlobProperties]
| Returns a generator to list the blobs under the specified container.
| The generator will lazily follow the continuation tokens returned by
| the service.
|
| :param str name_starts_with:
| Filters the results to return only blobs whose names
| begin with the specified prefix.
| :param include:
| Specifies one or more additional datasets to include in the response.
| Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted', 'deletedwithversions',
| 'tags', 'versions', 'immutabilitypolicy', 'legalhold'.
| :type include: list[str] or str
| :keyword int results_per_page:
| Controls the maximum number of Blobs that will be included in each page of results if using
| `ItemPaged.by_page()`.
| :keyword str start_from:
| Specifies the full path (inclusive) to list paths from.
| Only one entity level is supported.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) response of BlobProperties.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START list_blobs_in_container]
| :end-before: [END list_blobs_in_container]
| :language: python
| :dedent: 8
| :caption: List the blobs in the container.
|
| set_container_access_policy(self, signed_identifiers: Dict[str, ForwardRef('AccessPolicy')], public_access: Union[ForwardRef('PublicAccess'), str, NoneType] = None, **kwargs: Any) -> Dict[str, Union[str, datetime.datetime]]
| Sets the permissions for the specified container or stored access
| policies that may be used with Shared Access Signatures. The permissions
| indicate whether blobs in a container may be accessed publicly.
|
| :param signed_identifiers:
| A dictionary of access policies to associate with the container. The
| dictionary may contain up to 5 elements. An empty dictionary
| will clear the access policies set on the service.
| :type signed_identifiers: dict[str, ~azure.storage.blob.AccessPolicy]
| :param ~azure.storage.blob.PublicAccess public_access:
| Possible values include: 'container', 'blob'.
| :keyword lease:
| Required if the container has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A datetime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified date/time.
| :keyword ~datetime.datetime if_unmodified_since:
| A datetime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Container-updated property dict (Etag and last modified).
| :rtype: dict[str, str or ~datetime.datetime]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START set_container_access_policy]
| :end-before: [END set_container_access_policy]
| :language: python
| :dedent: 12
| :caption: Setting access policy on the container.
|
| set_container_metadata(self, metadata: Optional[Dict[str, str]] = None, **kwargs: Any) -> Dict[str, Union[str, ForwardRef('datetime')]]
| Sets one or more user-defined name-value pairs for the specified
| container. Each call to this operation replaces all existing metadata
| attached to the container. To remove all metadata from the container,
| call this operation with no metadata dict.
|
| :param metadata:
| A dict containing name-value pairs to associate with the container as
| metadata. Example: {'category':'test'}
| :type metadata: dict[str, str]
| :keyword lease:
| If specified, set_container_metadata only succeeds if the
| container's lease is active and matches this ID.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: Container-updated property dict (Etag and last modified).
| :rtype: dict[str, str or datetime]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START set_container_metadata]
| :end-before: [END set_container_metadata]
| :language: python
| :dedent: 12
| :caption: Setting metadata on the container.
|
| set_premium_page_blob_tier_blobs(self, premium_page_blob_tier: Union[str, ForwardRef('PremiumPageBlobTier'), NoneType], *blobs: Union[str, Dict[str, Any], azure.storage.blob._models.BlobProperties], **kwargs: Any) -> Iterator[ForwardRef('HttpResponse')]
| Sets the page blob tiers on all blobs. This API is only supported for page blobs on premium accounts.
|
| The maximum number of blobs that can be updated in a single request is 256.
|
| :param premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
|
| .. note::
| If you want to set different tier on different blobs please set this positional parameter to None.
| Then the blob tier on every BlobProperties will be taken.
|
| :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier
| :param blobs:
| The blobs with which to interact. This can be a single blob, or multiple values can
| be supplied, where each value is either the name of the blob (str) or BlobProperties.
|
| .. note::
| When the blob type is dict, here's a list of keys, value rules.
|
| blob name:
| key: 'name', value type: str
| premium blob tier:
| key: 'blob_tier', value type: PremiumPageBlobTier
| lease:
| key: 'lease_id', value type: Union[str, LeaseClient]
| timeout for subrequest:
| key: 'timeout', value type: int
|
| :type blobs: str or dict(str, Any) or ~azure.storage.blob.BlobProperties
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword bool raise_on_any_failure:
| This is a boolean param which defaults to True. When this is set, an exception
| is raised even if there is a single operation failure.
| :return: An iterator of responses, one for each blob in order
| :rtype: Iterator[~azure.core.pipeline.transport.HttpResponse]
|
| set_standard_blob_tier_blobs(self, standard_blob_tier: Union[str, ForwardRef('StandardBlobTier'), NoneType], *blobs: Union[str, Dict[str, Any], azure.storage.blob._models.BlobProperties], **kwargs: Any) -> Iterator[ForwardRef('HttpResponse')]
| This operation sets the tier on block blobs.
|
| A block blob's tier determines Hot/Cool/Archive storage type.
| This operation does not update the blob's ETag.
|
| The maximum number of blobs that can be updated in a single request is 256.
|
| :param standard_blob_tier:
| Indicates the tier to be set on all blobs. Options include 'Hot', 'Cool',
| 'Archive'. The hot tier is optimized for storing data that is accessed
| frequently. The cool storage tier is optimized for storing data that
| is infrequently accessed and stored for at least a month. The archive
| tier is optimized for storing data that is rarely accessed and stored
| for at least six months with flexible latency requirements.
|
| .. note::
| If you want to set different tier on different blobs please set this positional parameter to None.
| Then the blob tier on every BlobProperties will be taken.
|
| :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier
| :param blobs:
| The blobs with which to interact. This can be a single blob, or multiple values can
| be supplied, where each value is either the name of the blob (str) or BlobProperties.
|
| .. note::
| When the blob type is dict, here's a list of keys, value rules.
|
| blob name:
| key: 'name', value type: str
| standard blob tier:
| key: 'blob_tier', value type: StandardBlobTier
| rehydrate priority:
| key: 'rehydrate_priority', value type: RehydratePriority
| lease:
| key: 'lease_id', value type: Union[str, LeaseClient]
| snapshot:
| key: "snapshot", value type: str
| version id:
| key: "version_id", value type: str
| tags match condition:
| key: 'if_tags_match_condition', value type: str
| timeout for subrequest:
| key: 'timeout', value type: int
|
| :type blobs: str or dict(str, Any) or ~azure.storage.blob.BlobProperties
| :keyword ~azure.storage.blob.RehydratePriority rehydrate_priority:
| Indicates the priority with which to rehydrate an archived blob
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :keyword bool raise_on_any_failure:
| This is a boolean param which defaults to True. When this is set, an exception
| is raised even if there is a single operation failure.
| :return: An iterator of responses, one for each blob in order
| :rtype: Iterator[~azure.core.pipeline.transport.HttpResponse]
|
| upload_blob(self, name: str, data: Union[bytes, str, Iterable[~AnyStr], IO[~AnyStr]], blob_type: Union[str, azure.storage.blob._models.BlobType] = <BlobType.BLOCKBLOB: 'BlockBlob'>, length: Optional[int] = None, metadata: Optional[Dict[str, str]] = None, **kwargs) -> azure.storage.blob._blob_client.BlobClient
| Creates a new blob from a data source with automatic chunking.
|
| :param str name: The blob with which to interact.
| :param data: The blob data to upload.
| :type data: Union[bytes, str, Iterable[AnyStr], IO[AnyStr]]
| :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be
| either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob.
| :param int length:
| Number of bytes to read from the stream. This is optional, but
| should be supplied for optimal performance.
| :param metadata:
| Name-value pairs associated with the blob as metadata.
| :type metadata: dict(str, str)
| :keyword bool overwrite: Whether the blob to be uploaded should overwrite the current data.
| If True, upload_blob will overwrite the existing data. If set to False, the
| operation will fail with ResourceExistsError. The exception to the above is with Append
| blob types: if set to False and the data already exists, an error will not be raised
| and the data will be appended to the existing blob. If set overwrite=True, then the existing
| append blob will be deleted, and a new one created. Defaults to False.
| :keyword ~azure.storage.blob.ContentSettings content_settings:
| ContentSettings object used to set blob properties. Used to set content type, encoding,
| language, disposition, md5, and cache control.
| :keyword bool validate_content:
| If true, calculates an MD5 hash for each chunk of the blob. The storage
| service checks the hash of the content that has arrived with the hash
| that was sent. This is primarily valuable for detecting bitflips on
| the wire if using http instead of https, as https (the default), will
| already validate. Note that this MD5 hash is not stored with the
| blob. Also note that if enabled, the memory-efficient upload algorithm
| will not be used, because computing the MD5 hash requires buffering
| entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
| :keyword lease:
| Required if the container has an active lease. Value can be a BlobLeaseClient object
| or the lease ID as a string.
| :paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
| :keyword ~datetime.datetime if_modified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only
| if the resource has been modified since the specified time.
| :keyword ~datetime.datetime if_unmodified_since:
| A DateTime value. Azure expects the date value passed in to be UTC.
| If timezone is included, any non-UTC datetimes will be converted to UTC.
| If a date is passed in without timezone info, it is assumed to be UTC.
| Specify this header to perform the operation only if
| the resource has not been modified since the specified date/time.
| :keyword str etag:
| An ETag value, or the wildcard character (*). Used to check if the resource has changed,
| and act according to the condition specified by the `match_condition` parameter.
| :keyword ~azure.core.MatchConditions match_condition:
| The match condition to use upon the etag.
| :keyword str if_tags_match_condition:
| Specify a SQL where clause on blob tags to operate only on blob with a matching value.
| eg. ``"\"tagname\"='my tag'"``
|
| .. versionadded:: 12.4.0
|
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
| the timeout will apply to each call individually.
| :keyword ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier:
| A page blob tier value to set the blob to. The tier correlates to the size of the
| blob and number of allowed IOPS. This is only applicable to page blobs on
| premium storage accounts.
| :keyword ~azure.storage.blob.StandardBlobTier standard_blob_tier:
| A standard blob tier value to set the blob to. For this version of the library,
| this is only applicable to block blobs on standard storage accounts.
| :keyword int maxsize_condition:
| Optional conditional header. The max length in bytes permitted for
| the append blob. If the Append Block operation would cause the blob
| to exceed that limit or if the blob size is already greater than the
| value specified in this header, the request will fail with
| MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
| :keyword int max_concurrency:
| Maximum number of parallel connections to use when the blob size exceeds
| 64MB.
| :keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
| Encrypts the data on the service-side with the given key.
| Use of customer-provided keys must be done over HTTPS.
| As the encryption key itself is provided in the request,
| a secure connection must be established to transfer the key.
| :keyword str encryption_scope:
| A predefined encryption scope used to encrypt the data on the service. An encryption
| scope can be created using the Management API and referenced here by name. If a default
| encryption scope has been defined at the container, this value will override it if the
| container-level scope is configured to allow overrides. Otherwise an error will be raised.
|
| .. versionadded:: 12.2.0
|
| :keyword str encoding:
| Defaults to UTF-8.
| :keyword progress_hook:
| A callback to track the progress of a long running upload. The signature is
| function(current: int, total: Optional[int]) where current is the number of bytes transferred
| so far, and total is the size of the blob or None if the size is unknown.
| :paramtype progress_hook: Callable[[int, Optional[int]], None]
| :return: A BlobClient to interact with the newly uploaded blob.
| :rtype: ~azure.storage.blob.BlobClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_containers.py
| :start-after: [START upload_blob_to_container]
| :end-before: [END upload_blob_to_container]
| :language: python
| :dedent: 8
| :caption: Upload blob to the container.
|
| walk_blobs(self, name_starts_with: Optional[str] = None, include: Union[str, List[str], NoneType] = None, delimiter: str = '/', **kwargs: Any) -> azure.core.paging.ItemPaged[typing.Union[azure.storage.blob._models.BlobProperties, azure.storage.blob._list_blobs_helper.BlobPrefix]]
| Returns a generator to list the blobs under the specified container.
| The generator will lazily follow the continuation tokens returned by
| the service. This operation will list blobs in accordance with a hierarchy,
| as delimited by the specified delimiter character.
|
| :param str name_starts_with:
| Filters the results to return only blobs whose names
| begin with the specified prefix.
| :param include:
| Specifies one or more additional datasets to include in the response.
| Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted', 'deletedwithversions',
| 'tags', 'versions', 'immutabilitypolicy', 'legalhold'.
| :type include: list[str] or str
| :param str delimiter:
| When the request includes this parameter, the operation returns a BlobPrefix
| element in the response body that acts as a placeholder for all blobs whose
| names begin with the same substring up to the appearance of the delimiter
| character. The delimiter may be a single character or a string.
| :keyword str start_from:
| Specifies the full path (inclusive) to list paths from.
| :keyword int timeout:
| Sets the server-side timeout for the operation in seconds. For more details see
| https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
| This value is not tracked or validated on the client. To configure client-side network timesouts
| see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
| #other-client--per-operation-configuration>`__.
| :return: An iterable (auto-paging) response of BlobProperties or BlobPrefix.
| :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties or ~azure.storage.blob.BlobPrefix]
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_connection_string(conn_str: str, container_name: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> Self
| Create ContainerClient from a Connection String.
|
| :param str conn_str:
| A connection string to an Azure Storage account.
| :param container_name:
| The container name for the blob.
| :type container_name: str
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token, or the connection string already has shared
| access key values. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| Credentials provided here will take precedence over those in the connection string.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :type credential:
| ~azure.core.credentials.AzureNamedKeyCredential or
| ~azure.core.credentials.AzureSasCredential or
| ~azure.core.credentials.TokenCredential or
| str or dict[str, str] or None
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
| :return: A container client.
| :rtype: ~azure.storage.blob.ContainerClient
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_authentication.py
| :start-after: [START auth_from_connection_string_container]
| :end-before: [END auth_from_connection_string_container]
| :language: python
| :dedent: 8
| :caption: Creating the ContainerClient from a connection string.
|
| from_container_url(container_url: str, credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> Self
| Create ContainerClient from a container url.
|
| :param str container_url:
| The full endpoint URL to the Container, including SAS token if used. This could be
| either the primary endpoint, or the secondary endpoint depending on the current `location_mode`.
| :type container_url: str
| :param credential:
| The credentials with which to authenticate. This is optional if the
| account URL already has a SAS token, or the connection string already has shared
| access key values. The value can be a SAS token string,
| an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
| an account shared access key, or an instance of a TokenCredentials class from azure.identity.
| If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
| - except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
| If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
| should be the storage account key.
| :type credential:
| ~azure.core.credentials.AzureNamedKeyCredential or
| ~azure.core.credentials.AzureSasCredential or
| ~azure.core.credentials.TokenCredential or
| str or dict[str, str] or None
| :keyword str audience: The audience to use when requesting tokens for Azure Active Directory
| authentication. Only has an effect when credential is of type TokenCredential. The value could be
| https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
| :return: A container client.
| :rtype: ~azure.storage.blob.ContainerClient
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Readonly properties inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| api_version
| The version of the Storage API used for requests.
|
| :rtype: str
|
| primary_endpoint
| The full primary endpoint URL.
|
| :return: The full primary endpoint URL.
| :rtype: str
|
| primary_hostname
| The hostname of the primary endpoint.
|
| :return: The hostname of the primary endpoint.
| :rtype: str
|
| secondary_endpoint
| The full secondary endpoint URL if configured.
|
| If not available a ValueError will be raised. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The full secondary endpoint URL.
| :rtype: str
| :raise ValueError: If no secondary endpoint is configured.
|
| secondary_hostname
| The hostname of the secondary endpoint.
|
| If not available this will be None. To explicitly specify a secondary hostname, use the optional
| `secondary_hostname` keyword argument on instantiation.
|
| :return: The hostname of the secondary endpoint, or None if not configured.
| :rtype: Optional[str]
|
| url
| The full endpoint URL to this entity, including SAS token if used.
|
| This could be either the primary endpoint,
| or the secondary endpoint depending on the current :func:`location_mode`.
|
| :return: The full endpoint URL to this entity, including SAS token if used.
| :rtype: str
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.base_client.StorageAccountHostsMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| location_mode
| The location mode that the client is currently using.
|
| By default this will be "primary". Options include "primary" and "secondary".
|
| :return: The current location mode.
| :rtype: str
azure-storage-blob.ContainerEncryptionScope
Python Library Documentation: class ContainerEncryptionScope in module azure.storage.blob._models
class ContainerEncryptionScope(builtins.object)
| ContainerEncryptionScope(default_encryption_scope: str, **kwargs: Any) -> None
|
| The default encryption scope configuration for a container.
|
| This scope is used implicitly for all future writes within the container,
| but can be overridden per blob operation.
|
| .. versionadded:: 12.2.0
|
| :param str default_encryption_scope:
| Specifies the default encryption scope to set on the container and use for
| all future writes.
| :param bool prevent_encryption_scope_override:
| If true, prevents any request from specifying a different encryption scope than the scope
| set on the container. Default value is false.
|
| Methods defined here:
|
| __init__(self, default_encryption_scope: str, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'default_encryption_scope': <class 'str'>, 'prevent...
azure-storage-blob.ContainerProperties
Python Library Documentation: class ContainerProperties in module azure.storage.blob._models
class ContainerProperties(azure.storage.blob._shared.models.DictMixin)
| ContainerProperties(**kwargs: Any) -> None
|
| Blob container's properties class.
|
| Returned ``ContainerProperties`` instances expose these values through a
| dictionary interface, for example: ``container_props["last_modified"]``.
| Additionally, the container name is available as ``container_props["name"]``.
|
| Method resolution order:
| ContainerProperties
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'deleted': typing.Optional[bool], 'encryption_scope...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.ContainerSasPermissions
Python Library Documentation: class ContainerSasPermissions in module azure.storage.blob._models
class ContainerSasPermissions(builtins.object)
| ContainerSasPermissions(read: bool = False, write: bool = False, delete: bool = False, list: bool = False, delete_previous_version: bool = False, tag: bool = False, **kwargs: Any) -> None
|
| ContainerSasPermissions class to be used with the
| :func:`~azure.storage.blob.generate_container_sas` function and
| for the AccessPolicies used with
| :func:`~azure.storage.blob.ContainerClient.set_container_access_policy`.
|
| :param bool read:
| Read the content, properties, metadata or block list of any blob in the
| container. Use any blob in the container as the source of a copy operation.
| :param bool write:
| For any blob in the container, create or write content, properties,
| metadata, or block list. Snapshot or lease the blob. Resize the blob
| (page blob only). Use the blob as the destination of a copy operation
| within the same account. Note: You cannot grant permissions to read or
| write container properties or metadata, nor to lease a container, with
| a container SAS. Use an account SAS instead.
| :param bool delete:
| Delete any blob in the container. Note: You cannot grant permissions to
| delete a container with a container SAS. Use an account SAS instead.
| :param bool delete_previous_version:
| Delete the previous blob version for the versioning enabled storage account.
| :param bool list:
| List blobs in the container.
| :param bool tag:
| Set or get tags on the blobs in the container.
| :keyword bool add:
| Add a block to an append blob.
| :keyword bool create:
| Write a new blob, snapshot a blob, or copy a blob to a new blob.
| :keyword bool permanent_delete:
| To enable permanent delete on the blob is permitted.
| :keyword bool filter_by_tags:
| To enable finding blobs by tags.
| :keyword bool move:
| Move a blob or a directory and its contents to a new location.
| :keyword bool execute:
| Get the system properties and, if the hierarchical namespace is enabled for the storage account,
| get the POSIX ACL of a blob.
| :keyword bool set_immutability_policy:
| To enable operations related to set/delete immutability policy.
| To get immutability policy, you just need read permission.
|
| Methods defined here:
|
| __init__(self, read: bool = False, write: bool = False, delete: bool = False, list: bool = False, delete_previous_version: bool = False, tag: bool = False, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_string(permission: str) -> 'ContainerSasPermissions'
| Create a ContainerSasPermissions from a string.
|
| To specify read, write, delete, or list permissions you need only to
| include the first letter of the word in the string. E.g. For read and
| write permissions, you would provide a string "rw".
|
| :param str permission: The string which dictates the read, write, delete,
| and list permissions.
| :return: A ContainerSasPermissions object
| :rtype: ~azure.storage.blob.ContainerSasPermissions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'add': typing.Optional[bool], 'create': typing.Opti...
|
| delete = False
|
| delete_previous_version = False
|
| list = False
|
| read = False
|
| tag = False
|
| write = False
azure-storage-blob.ContentSettings
Python Library Documentation: class ContentSettings in module azure.storage.blob._models
class ContentSettings(azure.storage.blob._shared.models.DictMixin)
| ContentSettings(content_type: Optional[str] = None, content_encoding: Optional[str] = None, content_language: Optional[str] = None, content_disposition: Optional[str] = None, cache_control: Optional[str] = None, content_md5: Optional[bytearray] = None, **kwargs: Any) -> None
|
| The content settings of a blob.
|
| :param Optional[str] content_type:
| The content type specified for the blob. If no content type was
| specified, the default content type is application/octet-stream.
| :param Optional[str] content_encoding:
| If the content_encoding has previously been set
| for the blob, that value is stored.
| :param Optional[str] content_language:
| If the content_language has previously been set
| for the blob, that value is stored.
| :param Optional[str] content_disposition:
| content_disposition conveys additional information about how to
| process the response payload, and also can be used to attach
| additional metadata. If content_disposition has previously been set
| for the blob, that value is stored.
| :param Optional[str] cache_control:
| If the cache_control has previously been set for
| the blob, that value is stored.
| :param Optional[bytearray] content_md5:
| If the content_md5 has been set for the blob, this response
| header is stored so that the client can check for message content
| integrity.
|
| Method resolution order:
| ContentSettings
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, content_type: Optional[str] = None, content_encoding: Optional[str] = None, content_language: Optional[str] = None, content_disposition: Optional[str] = None, cache_control: Optional[str] = None, content_md5: Optional[bytearray] = None, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'cache_control': typing.Optional[str], 'content_dis...
|
| cache_control = None
|
| content_disposition = None
|
| content_encoding = None
|
| content_language = None
|
| content_md5 = None
|
| content_type = None
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.CopyProperties
Python Library Documentation: class CopyProperties in module azure.storage.blob._models
class CopyProperties(azure.storage.blob._shared.models.DictMixin)
| CopyProperties(**kwargs: Any) -> None
|
| Blob Copy Properties.
|
| These properties will be `None` if this blob has never been the destination
| in a Copy Blob operation, or if this blob has been modified after a concluded
| Copy Blob operation, for example, using Set Blob Properties, Upload Blob, or Commit Block List.
|
| Method resolution order:
| CopyProperties
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'completion_time': typing.Optional[ForwardRef('date...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.CorsRule
Python Library Documentation: class CorsRule in module azure.storage.blob._models
class CorsRule(azure.storage.blob._generated.models._models_py3.CorsRule)
| CorsRule(allowed_origins: List[str], allowed_methods: List[str], **kwargs: Any) -> None
|
| CORS is an HTTP feature that enables a web application running under one
| domain to access resources in another domain. Web browsers implement a
| security restriction known as same-origin policy that prevents a web page
| from calling APIs in a different domain; CORS provides a secure way to
| allow one domain (the origin domain) to call APIs in another domain.
|
| :param list(str) allowed_origins:
| A list of origin domains that will be allowed via CORS, or "*" to allow
| all domains. The list of must contain at least one entry. Limited to 64
| origin domains. Each allowed origin can have up to 256 characters.
| :param list(str) allowed_methods:
| A list of HTTP methods that are allowed to be executed by the origin.
| The list of must contain at least one entry. For Azure Storage,
| permitted methods are DELETE, GET, HEAD, MERGE, POST, OPTIONS or PUT.
| :keyword list(str) allowed_headers:
| Defaults to an empty list. A list of headers allowed to be part of
| the cross-origin request. Limited to 64 defined headers and 2 prefixed
| headers. Each header can be up to 256 characters.
| :keyword list(str) exposed_headers:
| Defaults to an empty list. A list of response headers to expose to CORS
| clients. Limited to 64 defined headers and two prefixed headers. Each
| header can be up to 256 characters.
| :keyword int max_age_in_seconds:
| The number of seconds that the client/browser should cache a
| preflight response.
|
| Method resolution order:
| CorsRule
| azure.storage.blob._generated.models._models_py3.CorsRule
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, allowed_origins: List[str], allowed_methods: List[str], **kwargs: Any) -> None
| :keyword allowed_origins: The origin domains that are permitted to make a request against the
| storage service via CORS. The origin domain is the domain from which the request originates.
| Note that the origin must be an exact case-sensitive match with the origin that the user age
| sends to the service. You can also use the wildcard character '*' to allow all origin domains
| to make requests via CORS. Required.
| :paramtype allowed_origins: str
| :keyword allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a
| CORS request. (comma separated). Required.
| :paramtype allowed_methods: str
| :keyword allowed_headers: the request headers that the origin domain may specify on the CORS
| request. Required.
| :paramtype allowed_headers: str
| :keyword exposed_headers: The response headers that may be sent in the response to the CORS
| request and exposed by the browser to the request issuer. Required.
| :paramtype exposed_headers: str
| :keyword max_age_in_seconds: The maximum amount time that a browser should cache the preflight
| OPTIONS request. Required.
| :paramtype max_age_in_seconds: int
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'allowed_headers': <class 'str'>, 'allowed_methods'...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.CustomerProvidedEncryptionKey
Python Library Documentation: class CustomerProvidedEncryptionKey in module azure.storage.blob._models
class CustomerProvidedEncryptionKey(builtins.object)
| CustomerProvidedEncryptionKey(key_value: str, key_hash: str) -> None
|
| All data in Azure Storage is encrypted at-rest using an account-level encryption key.
| In versions 2018-06-17 and newer, you can manage the key used to encrypt blob contents
| and application metadata per-blob by providing an AES-256 encryption key in requests to the storage service.
|
| When you use a customer-provided key, Azure Storage does not manage or persist your key.
| When writing data to a blob, the provided key is used to encrypt your data before writing it to disk.
| A SHA-256 hash of the encryption key is written alongside the blob contents,
| and is used to verify that all subsequent operations against the blob use the same encryption key.
| This hash cannot be used to retrieve the encryption key or decrypt the contents of the blob.
| When reading a blob, the provided key is used to decrypt your data after reading it from disk.
| In both cases, the provided encryption key is securely discarded
| as soon as the encryption or decryption process completes.
|
| :param str key_value:
| Base64-encoded AES-256 encryption key value.
| :param str key_hash:
| Base64-encoded SHA256 of the encryption key.
|
| Methods defined here:
|
| __init__(self, key_value: str, key_hash: str) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'algorithm': <class 'str'>, 'key_hash': <class 'str...
azure-storage-blob.DelimitedJsonDialect
Python Library Documentation: class DelimitedJsonDialect in module azure.storage.blob._models
class DelimitedJsonDialect(azure.storage.blob._shared.models.DictMixin)
| DelimitedJsonDialect(**kwargs: Any) -> None
|
| Defines the input or output JSON serialization for a blob data query.
|
| :keyword str delimiter: The line separator character, default value is '\\n'.
|
| Method resolution order:
| DelimitedJsonDialect
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.DelimitedTextDialect
Python Library Documentation: class DelimitedTextDialect in module azure.storage.blob._models
class DelimitedTextDialect(azure.storage.blob._shared.models.DictMixin)
| DelimitedTextDialect(**kwargs: Any) -> None
|
| Defines the input or output delimited (CSV) serialization for a blob query request.
|
| :keyword str delimiter:
| Column separator, defaults to ','.
| :keyword str quotechar:
| Field quote, defaults to '"'.
| :keyword str lineterminator:
| Record separator, defaults to '\\n'.
| :keyword str escapechar:
| Escape char, defaults to empty.
| :keyword bool has_header:
| Whether the blob data includes headers in the first line. The default value is False, meaning that the
| data will be returned inclusive of the first line. If set to True, the data will be returned exclusive
| of the first line.
|
| Method resolution order:
| DelimitedTextDialect
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.Dict
Python Library Documentation: _SpecialGenericAlias in module typing
Dict = typing.Dict
A generic version of dict.
azure-storage-blob.ExponentialRetry
Python Library Documentation: class ExponentialRetry in module azure.storage.blob._shared.policies
class ExponentialRetry(StorageRetryPolicy)
| ExponentialRetry(initial_backoff: int = 15, increment_base: int = 3, retry_total: int = 3, retry_to_secondary: bool = False, random_jitter_range: int = 3, **kwargs: Any) -> None
|
| Exponential retry.
|
| Method resolution order:
| ExponentialRetry
| StorageRetryPolicy
| azure.core.pipeline.policies._base.HTTPPolicy
| abc.ABC
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__(self, initial_backoff: int = 15, increment_base: int = 3, retry_total: int = 3, retry_to_secondary: bool = False, random_jitter_range: int = 3, **kwargs: Any) -> None
| Constructs an Exponential retry object. The initial_backoff is used for
| the first retry. Subsequent retries are retried after initial_backoff +
| increment_power^retry_count seconds.
|
| :param int initial_backoff:
| The initial backoff interval, in seconds, for the first retry.
| :param int increment_base:
| The base, in seconds, to increment the initial_backoff by after the
| first retry.
| :param int retry_total:
| The maximum number of retry attempts.
| :param bool retry_to_secondary:
| Whether the request should be retried to secondary, if able. This should
| only be enabled of RA-GRS accounts are used and potentially stale data
| can be handled.
| :param int random_jitter_range:
| A number in seconds which indicates a range to jitter/randomize for the back-off interval.
| For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3.
|
| get_backoff_time(self, settings: Dict[str, Any]) -> float
| Calculates how long to sleep before retrying.
|
| :param Dict[str, Any] settings: The configurable values pertaining to get backoff time.
| :return:
| A float indicating how long to wait before retrying the request,
| or None to indicate no retry should be performed.
| :rtype: float
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {'increment_base': <class 'int'>, 'initial_backoff':...
|
| __parameters__ = ()
|
| ----------------------------------------------------------------------
| Methods inherited from StorageRetryPolicy:
|
| configure_retries(self, request: 'PipelineRequest') -> Dict[str, Any]
| Configure the retry settings for the request.
|
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :return: A dictionary containing the retry settings.
| :rtype: Dict[str, Any]
|
| increment(self, settings: Dict[str, Any], request: 'PipelineRequest', response: Optional[ForwardRef('PipelineResponse')] = None, error: Optional[azure.core.exceptions.AzureError] = None) -> bool
| Increment the retry counters.
|
| :param Dict[str, Any] settings: The configurable values pertaining to the increment operation.
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :param response: A pipeline response object.
| :type response: ~azure.core.pipeline.PipelineResponse or None
| :param error: An error encountered during the request, or
| None if the response was received successfully.
| :type error: ~azure.core.exceptions.AzureError or None
| :return: Whether the retry attempts are exhausted.
| :rtype: bool
|
| send(self, request)
| Send the request with retry logic.
|
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :return: A pipeline response object.
| :rtype: ~azure.core.pipeline.PipelineResponse
|
| sleep(self, settings, transport)
| Sleep for the backoff time.
|
| :param Dict[str, Any] settings: The configurable values pertaining to the sleep operation.
| :param transport: The transport to use for sleeping.
| :type transport:
| ~azure.core.pipeline.transport.AsyncioBaseTransport or
| ~azure.core.pipeline.transport.BaseTransport
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.core.pipeline.policies._base.HTTPPolicy:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.core.pipeline.policies._base.HTTPPolicy:
|
| __orig_bases__ = (<class 'abc.ABC'>, typing.Generic[~HTTPRequestType, ...
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
|
| __init_subclass__(...)
| Function to initialize subclasses.
azure-storage-blob.FilteredBlob
Python Library Documentation: class FilteredBlob in module azure.storage.blob._models
class FilteredBlob(azure.storage.blob._shared.models.DictMixin)
| FilteredBlob(**kwargs: Any) -> None
|
| Blob info from a Filter Blobs API call.
|
| Method resolution order:
| FilteredBlob
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'container_name': typing.Optional[str], 'name': <cl...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.IO
Python Library Documentation: class IO in module typing
class IO(Generic)
| Generic base class for TextIO and BinaryIO.
|
| This is an abstract, generic version of the return of open().
|
| NOTE: This does not distinguish between the different possible
| classes (text vs. binary, read vs. write vs. read/write,
| append-only, unbuffered). The TextIO and BinaryIO subclasses
| below capture the distinctions between text vs. binary, which is
| pervasive in the interface; however we currently do not offer a
| way to track the other distinctions in the type system.
|
| Method resolution order:
| IO
| Generic
| builtins.object
|
| Methods defined here:
|
| __enter__(self) -> 'IO[AnyStr]'
|
| __exit__(self, type, value, traceback) -> None
|
| close(self) -> None
|
| fileno(self) -> int
|
| flush(self) -> None
|
| isatty(self) -> bool
|
| read(self, n: int = -1) -> ~AnyStr
|
| readable(self) -> bool
|
| readline(self, limit: int = -1) -> ~AnyStr
|
| readlines(self, hint: int = -1) -> List[~AnyStr]
|
| seek(self, offset: int, whence: int = 0) -> int
|
| seekable(self) -> bool
|
| tell(self) -> int
|
| truncate(self, size: int = None) -> int
|
| writable(self) -> bool
|
| write(self, s: ~AnyStr) -> int
|
| writelines(self, lines: List[~AnyStr]) -> None
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| closed
|
| mode
|
| name
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {}
|
| __orig_bases__ = (typing.Generic[~AnyStr],)
|
| __parameters__ = (~AnyStr,)
|
| ----------------------------------------------------------------------
| Class methods inherited from Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
|
| __init_subclass__(...)
| Function to initialize subclasses.
azure-storage-blob.ImmutabilityPolicy
Python Library Documentation: class ImmutabilityPolicy in module azure.storage.blob._models
class ImmutabilityPolicy(azure.storage.blob._shared.models.DictMixin)
| ImmutabilityPolicy(**kwargs: Any) -> None
|
| Optional parameters for setting the immutability policy of a blob, blob snapshot or blob version.
|
| .. versionadded:: 12.10.0
| This was introduced in API version '2020-10-02'.
|
| :keyword ~datetime.datetime expiry_time:
| Specifies the date time when the blobs immutability policy is set to expire.
| :keyword str or ~azure.storage.blob.BlobImmutabilityPolicyMode policy_mode:
| Specifies the immutability policy mode to set on the blob.
| Possible values to set include: "Locked", "Unlocked".
| "Mutable" can only be returned by service, don't set to "Mutable".
|
| Method resolution order:
| ImmutabilityPolicy
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'expiry_time': typing.Optional[ForwardRef('datetime...
|
| expiry_time = None
|
| policy_mode = None
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.Iterable
Python Library Documentation: _SpecialGenericAlias in module typing
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
azure-storage-blob.LeaseProperties
Python Library Documentation: class LeaseProperties in module azure.storage.blob._models
class LeaseProperties(azure.storage.blob._shared.models.DictMixin)
| LeaseProperties(**kwargs: Any) -> None
|
| Blob Lease Properties.
|
| Method resolution order:
| LeaseProperties
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'duration': typing.Optional[str], 'state': <class '...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.LinearRetry
Python Library Documentation: class LinearRetry in module azure.storage.blob._shared.policies
class LinearRetry(StorageRetryPolicy)
| LinearRetry(backoff: int = 15, retry_total: int = 3, retry_to_secondary: bool = False, random_jitter_range: int = 3, **kwargs: Any) -> None
|
| Linear retry.
|
| Method resolution order:
| LinearRetry
| StorageRetryPolicy
| azure.core.pipeline.policies._base.HTTPPolicy
| abc.ABC
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__(self, backoff: int = 15, retry_total: int = 3, retry_to_secondary: bool = False, random_jitter_range: int = 3, **kwargs: Any) -> None
| Constructs a Linear retry object.
|
| :param int backoff:
| The backoff interval, in seconds, between retries.
| :param int retry_total:
| The maximum number of retry attempts.
| :param bool retry_to_secondary:
| Whether the request should be retried to secondary, if able. This should
| only be enabled of RA-GRS accounts are used and potentially stale data
| can be handled.
| :param int random_jitter_range:
| A number in seconds which indicates a range to jitter/randomize for the back-off interval.
| For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3.
|
| get_backoff_time(self, settings: Dict[str, Any]) -> float
| Calculates how long to sleep before retrying.
|
| :param Dict[str, Any] settings: The configurable values pertaining to the backoff time.
| :return:
| A float indicating how long to wait before retrying the request,
| or None to indicate no retry should be performed.
| :rtype: float
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {'initial_backoff': <class 'int'>, 'random_jitter_ra...
|
| __parameters__ = ()
|
| ----------------------------------------------------------------------
| Methods inherited from StorageRetryPolicy:
|
| configure_retries(self, request: 'PipelineRequest') -> Dict[str, Any]
| Configure the retry settings for the request.
|
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :return: A dictionary containing the retry settings.
| :rtype: Dict[str, Any]
|
| increment(self, settings: Dict[str, Any], request: 'PipelineRequest', response: Optional[ForwardRef('PipelineResponse')] = None, error: Optional[azure.core.exceptions.AzureError] = None) -> bool
| Increment the retry counters.
|
| :param Dict[str, Any] settings: The configurable values pertaining to the increment operation.
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :param response: A pipeline response object.
| :type response: ~azure.core.pipeline.PipelineResponse or None
| :param error: An error encountered during the request, or
| None if the response was received successfully.
| :type error: ~azure.core.exceptions.AzureError or None
| :return: Whether the retry attempts are exhausted.
| :rtype: bool
|
| send(self, request)
| Send the request with retry logic.
|
| :param request: A pipeline request object.
| :type request: ~azure.core.pipeline.PipelineRequest
| :return: A pipeline response object.
| :rtype: ~azure.core.pipeline.PipelineResponse
|
| sleep(self, settings, transport)
| Sleep for the backoff time.
|
| :param Dict[str, Any] settings: The configurable values pertaining to the sleep operation.
| :param transport: The transport to use for sleeping.
| :type transport:
| ~azure.core.pipeline.transport.AsyncioBaseTransport or
| ~azure.core.pipeline.transport.BaseTransport
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.core.pipeline.policies._base.HTTPPolicy:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.core.pipeline.policies._base.HTTPPolicy:
|
| __orig_bases__ = (<class 'abc.ABC'>, typing.Generic[~HTTPRequestType, ...
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
|
| __init_subclass__(...)
| Function to initialize subclasses.
azure-storage-blob.LocationMode
Python Library Documentation: class LocationMode in module azure.storage.blob._shared.models class LocationMode(builtins.object) | Specifies the location the request should be sent to. This mode only applies | for RA-GRS accounts which allow secondary read access. All other account types | must use PRIMARY. | | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | PRIMARY = 'primary' | | SECONDARY = 'secondary'
azure-storage-blob.Metrics
Python Library Documentation: class Metrics in module azure.storage.blob._models
class Metrics(azure.storage.blob._generated.models._models_py3.Metrics)
| Metrics(**kwargs: Any) -> None
|
| A summary of request statistics grouped by API in hour or minute aggregates
| for blobs.
|
| :keyword str version:
| The version of Storage Analytics to configure. The default value is 1.0.
| :keyword bool enabled:
| Indicates whether metrics are enabled for the Blob service.
| The default value is `False`.
| :keyword bool include_apis:
| Indicates whether metrics should generate summary statistics for called API operations.
| :keyword ~azure.storage.blob.RetentionPolicy retention_policy:
| Determines how long the associated data should persist. If not specified the retention
| policy will be disabled by default.
|
| Method resolution order:
| Metrics
| azure.storage.blob._generated.models._models_py3.Metrics
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| :keyword version: The version of Storage Analytics to configure.
| :paramtype version: str
| :keyword enabled: Indicates whether metrics are enabled for the Blob service. Required.
| :paramtype enabled: bool
| :keyword include_apis: Indicates whether metrics should generate summary statistics for called
| API operations.
| :paramtype include_apis: bool
| :keyword retention_policy: the retention policy which determines how long the associated data
| should persist.
| :paramtype retention_policy: ~azure.storage.blob.models.RetentionPolicy
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'enabled': <class 'bool'>, 'include_apis': typing.O...
|
| enabled = False
|
| retention_policy = <azure.storage.blob._models.RetentionPolicy object>
|
| version = '1.0'
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.ObjectReplicationPolicy
Python Library Documentation: class ObjectReplicationPolicy in module azure.storage.blob._models
class ObjectReplicationPolicy(azure.storage.blob._shared.models.DictMixin)
| ObjectReplicationPolicy(**kwargs: Any) -> None
|
| Policy id and rule ids applied to a blob.
|
| Method resolution order:
| ObjectReplicationPolicy
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'policy_id': <class 'str'>, 'rules': typing.List[az...
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.ObjectReplicationRule
Python Library Documentation: class ObjectReplicationRule in module azure.storage.blob._models
class ObjectReplicationRule(azure.storage.blob._shared.models.DictMixin)
| ObjectReplicationRule(**kwargs: Any) -> None
|
| Policy id and rule ids applied to a blob.
|
| Method resolution order:
| ObjectReplicationRule
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'rule_id': <class 'str'>, 'status': <class 'str'>}
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.Optional
Python Library Documentation: _SpecialForm in module typing
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
azure-storage-blob.PageRange
Python Library Documentation: class PageRange in module azure.storage.blob._models
class PageRange(azure.storage.blob._shared.models.DictMixin)
| PageRange(start: Optional[int] = None, end: Optional[int] = None, *, cleared: bool = False) -> None
|
| Page Range for page blob.
|
| :param int start:
| Start of page range in bytes.
| :param int end:
| End of page range in bytes.
|
| Method resolution order:
| PageRange
| azure.storage.blob._shared.models.DictMixin
| builtins.object
|
| Methods defined here:
|
| __init__(self, start: Optional[int] = None, end: Optional[int] = None, *, cleared: bool = False) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'cleared': <class 'bool'>, 'end': typing.Optional[i...
|
| end = None
|
| start = None
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._shared.models.DictMixin:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __eq__(self, other)
| Return self==value.
|
| __getitem__(self, key)
|
| __len__(self)
|
| __ne__(self, other)
| Return self!=value.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, item)
|
| __str__(self)
| Return str(self).
|
| get(self, key, default=None)
|
| has_key(self, k)
|
| items(self)
|
| keys(self)
|
| update(self, *args, **kwargs)
|
| values(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._shared.models.DictMixin:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._shared.models.DictMixin:
|
| __hash__ = None
azure-storage-blob.PartialBatchErrorException
Python Library Documentation: class PartialBatchErrorException in module azure.storage.blob._shared.response_handlers class PartialBatchErrorException(azure.core.exceptions.HttpResponseError) | PartialBatchErrorException(message, response, parts) | | There is a partial failure in batch operations. | | :param str message: The message of the exception. | :param response: Server response to be deserialized. | :param list parts: A list of the parts in multipart response. | | Method resolution order: | PartialBatchErrorException | azure.core.exceptions.HttpResponseError | azure.core.exceptions.AzureError | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, message, response, parts) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from azure.core.exceptions.HttpResponseError: | | __str__(self) -> 'str' | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from azure.core.exceptions.AzureError: | | raise_with_traceback(self) -> 'None' | Raise the exception with the existing traceback. | | .. deprecated:: 1.22.0 | This method is deprecated as we don't support Python 2 anymore. Use raise/from instead. | | ---------------------------------------------------------------------- | Data descriptors inherited from azure.core.exceptions.AzureError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
azure-storage-blob.PremiumPageBlobTier
Python Library Documentation: class PremiumPageBlobTier in module azure.storage.blob._models
class PremiumPageBlobTier(builtins.str, enum.Enum)
| PremiumPageBlobTier(*values)
|
| Specifies the page blob tier to set the blob to. This is only applicable to page
| blobs on premium storage accounts. Please take a look at:
| https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets
| for detailed information on the corresponding IOPS and throughput per PageBlobTier.
|
| Method resolution order:
| PremiumPageBlobTier
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| P10 = <PremiumPageBlobTier.P10: 'P10'>
|
| P15 = <PremiumPageBlobTier.P15: 'P15'>
|
| P20 = <PremiumPageBlobTier.P20: 'P20'>
|
| P30 = <PremiumPageBlobTier.P30: 'P30'>
|
| P4 = <PremiumPageBlobTier.P4: 'P4'>
|
| P40 = <PremiumPageBlobTier.P40: 'P40'>
|
| P50 = <PremiumPageBlobTier.P50: 'P50'>
|
| P6 = <PremiumPageBlobTier.P6: 'P6'>
|
| P60 = <PremiumPageBlobTier.P60: 'P60'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.PublicAccess
Python Library Documentation: class PublicAccess in module azure.storage.blob._models
class PublicAccess(builtins.str, enum.Enum)
| PublicAccess(*values)
|
| Specifies whether data in the container may be accessed publicly and the level of access.
|
| Method resolution order:
| PublicAccess
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BLOB = <PublicAccess.BLOB: 'blob'>
|
| CONTAINER = <PublicAccess.CONTAINER: 'container'>
|
| OFF = <PublicAccess.OFF: 'off'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.QuickQueryDialect
Python Library Documentation: class QuickQueryDialect in module azure.storage.blob._models
class QuickQueryDialect(builtins.str, enum.Enum)
| QuickQueryDialect(*values)
|
| Specifies the quick query input/output dialect.
|
| Method resolution order:
| QuickQueryDialect
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| DELIMITEDJSON = <QuickQueryDialect.DELIMITEDJSON: 'DelimitedJsonDialec...
|
| DELIMITEDTEXT = <QuickQueryDialect.DELIMITEDTEXT: 'DelimitedTextDialec...
|
| PARQUET = <QuickQueryDialect.PARQUET: 'ParquetDialect'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.RehydratePriority
Python Library Documentation: class RehydratePriority in module azure.storage.blob._generated.models._azure_blob_storage_enums
class RehydratePriority(builtins.str, enum.Enum)
| RehydratePriority(*values)
|
| If an object is in rehydrate pending state then this header is returned with priority of
| rehydrate. Valid values are High and Standard.
|
| Method resolution order:
| RehydratePriority
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| HIGH = <RehydratePriority.HIGH: 'High'>
|
| STANDARD = <RehydratePriority.STANDARD: 'Standard'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.ResourceTypes
Python Library Documentation: class ResourceTypes in module azure.storage.blob._shared.models
class ResourceTypes(builtins.object)
| ResourceTypes(service: bool = False, container: bool = False, object: bool = False) -> None
|
| Specifies the resource types that are accessible with the account SAS.
|
| :param bool service:
| Access to service-level APIs (e.g., Get/Set Service Properties,
| Get Service Stats, List Containers/Queues/Shares)
| :param bool container:
| Access to container-level APIs (e.g., Create/Delete Container,
| Create/Delete Queue, Create/Delete Share,
| List Blobs/Files and Directories)
| :param bool object:
| Access to object-level APIs for blobs, queue messages, and
| files(e.g. Put Blob, Query Entity, Get Messages, Create File, etc.)
|
| Methods defined here:
|
| __init__(self, service: bool = False, container: bool = False, object: bool = False) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_string(string)
| Create a ResourceTypes from a string.
|
| To specify service, container, or object you need only to
| include the first letter of the word in the string. E.g. service and container,
| you would provide a string "sc".
|
| :param str string: Specify service, container, or object in
| in the string with the first letter of the word.
| :return: A ResourceTypes object
| :rtype: ~azure.storage.blob.ResourceTypes
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'_str': <class 'str'>, 'container': <class 'bool'>,...
|
| container = False
|
| object = False
|
| service = False
azure-storage-blob.RetentionPolicy
Python Library Documentation: class RetentionPolicy in module azure.storage.blob._models
class RetentionPolicy(azure.storage.blob._generated.models._models_py3.RetentionPolicy)
| RetentionPolicy(enabled: bool = False, days: Optional[int] = None) -> None
|
| The retention policy which determines how long the associated data should
| persist.
|
| :param bool enabled:
| Indicates whether a retention policy is enabled for the storage service.
| The default value is False.
| :param Optional[int] days:
| Indicates the number of days that metrics or logging or
| soft-deleted data should be retained. All data older than this value will
| be deleted. If enabled=True, the number of days must be specified.
|
| Method resolution order:
| RetentionPolicy
| azure.storage.blob._generated.models._models_py3.RetentionPolicy
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, enabled: bool = False, days: Optional[int] = None) -> None
| :keyword enabled: Indicates whether a retention policy is enabled for the storage service.
| Required.
| :paramtype enabled: bool
| :keyword days: Indicates the number of days that metrics or logging or soft-deleted data should
| be retained. All data older than this value will be deleted.
| :paramtype days: int
| :keyword allow_permanent_delete: Indicates whether permanent delete is allowed on this storage
| account.
| :paramtype allow_permanent_delete: bool
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'days': typing.Optional[int], 'enabled': <class 'bo...
|
| days = None
|
| enabled = False
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.SequenceNumberAction
Python Library Documentation: class SequenceNumberAction in module azure.storage.blob._models
class SequenceNumberAction(builtins.str, enum.Enum)
| SequenceNumberAction(*values)
|
| Sequence number actions.
|
| Method resolution order:
| SequenceNumberAction
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| INCREMENT = <SequenceNumberAction.INCREMENT: 'increment'>
|
| MAX = <SequenceNumberAction.MAX: 'max'>
|
| UPDATE = <SequenceNumberAction.UPDATE: 'update'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.Services
Python Library Documentation: class Services in module azure.storage.blob._shared.models class Services(builtins.object) | Services(*, blob: bool = False, queue: bool = False, fileshare: bool = False) -> None | | Specifies the services accessible with the account SAS. | | :keyword bool blob: | Access for the `~azure.storage.blob.BlobServiceClient`. Default is False. | :keyword bool queue: | Access for the `~azure.storage.queue.QueueServiceClient`. Default is False. | :keyword bool fileshare: | Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. | | Methods defined here: | | __init__(self, *, blob: bool = False, queue: bool = False, fileshare: bool = False) -> None | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Class methods defined here: | | from_string(string) | Create Services from a string. | | To specify blob, queue, or file you need only to | include the first letter of the word in the string. E.g. for blob and queue | you would provide a string "bq". | | :param str string: Specify blob, queue, or file in | in the string with the first letter of the word. | :return: A Services object | :rtype: ~azure.storage.blob.Services | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
azure-storage-blob.StandardBlobTier
Python Library Documentation: class StandardBlobTier in module azure.storage.blob._models
class StandardBlobTier(builtins.str, enum.Enum)
| StandardBlobTier(*values)
|
| Specifies the blob tier to set the blob to. This is only applicable for
| block blobs on standard storage accounts.
|
| Method resolution order:
| StandardBlobTier
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ARCHIVE = <StandardBlobTier.ARCHIVE: 'Archive'>
|
| COLD = <StandardBlobTier.COLD: 'Cold'>
|
| COOL = <StandardBlobTier.COOL: 'Cool'>
|
| HOT = <StandardBlobTier.HOT: 'Hot'>
|
| SMART = <StandardBlobTier.SMART: 'Smart'>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.StaticWebsite
Python Library Documentation: class StaticWebsite in module azure.storage.blob._models
class StaticWebsite(azure.storage.blob._generated.models._models_py3.StaticWebsite)
| StaticWebsite(**kwargs: Any) -> None
|
| The properties that enable an account to host a static website.
|
| :keyword bool enabled:
| Indicates whether this account is hosting a static website.
| The default value is `False`.
| :keyword str index_document:
| The default name of the index page under each directory.
| :keyword str error_document404_path:
| The absolute path of the custom 404 page.
| :keyword str default_index_document_path:
| Absolute path of the default index page.
|
| Method resolution order:
| StaticWebsite
| azure.storage.blob._generated.models._models_py3.StaticWebsite
| azure.storage.blob._generated._utils.serialization.Model
| builtins.object
|
| Methods defined here:
|
| __init__(self, **kwargs: Any) -> None
| :keyword enabled: Indicates whether this account is hosting a static website. Required.
| :paramtype enabled: bool
| :keyword index_document: The default name of the index page under each directory.
| :paramtype index_document: str
| :keyword error_document404_path: The absolute path of the custom 404 page.
| :paramtype error_document404_path: str
| :keyword default_index_document_path: Absolute path of the default index page.
| :paramtype default_index_document_path: str
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'default_index_document_path': typing.Optional[str]...
|
| enabled = False
|
| ----------------------------------------------------------------------
| Methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __eq__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are equal
| :rtype: bool
|
| __ne__(self, other: Any) -> bool
| Compare objects by comparing all attributes.
|
| :param object other: The object to compare
| :returns: True if objects are not equal
| :rtype: bool
|
| __str__(self) -> str
| Return str(self).
|
| as_dict(self, keep_readonly: bool = True, key_transformer: Callable[[str, dict[str, Any], Any], Any] = <function attribute_transformer at 0x000002835BF87CE0>, **kwargs: Any) -> MutableMapping[str, Any]
| Return a dict that can be serialized using json.dump.
|
| Advanced usage might optionally use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
|
| Key is the attribute name used in Python. Attr_desc
| is a dict of metadata. Currently contains 'type' with the
| msrest type and 'key' with the RestAPI encoded key.
| Value is the current value in this object.
|
| The string returned will be used to serialize the key.
| If the return type is a list, this is considered hierarchical
| result dict.
|
| See the three examples in this file:
|
| - attribute_transformer
| - full_restapi_key_transformer
| - last_restapi_key_transformer
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :param function key_transformer: A key transformer function.
| :returns: A dict JSON compatible object
| :rtype: dict
|
| serialize(self, keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
| Return the JSON that would be sent to server from this model.
|
| This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`.
|
| If you want XML serialization, you can pass the kwargs is_xml=True.
|
| :param bool keep_readonly: If you want to serialize the readonly attributes
| :returns: A dict JSON compatible object
| :rtype: dict
|
| ----------------------------------------------------------------------
| Class methods inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| deserialize(data: Any, content_type: Optional[str] = None) -> Self
| Parse a str using the RestAPI syntax and return a model.
|
| :param str data: A str using RestAPI structure. JSON by default.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| enable_additional_properties_sending() -> None
|
| from_dict(data: Any, key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None) -> Self
| Parse a dict using given key extractor return a model.
|
| By default consider key
| extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor
| and last_rest_key_case_insensitive_extractor)
|
| :param dict data: A dict using RestAPI structure
| :param function key_extractors: A key extractor function.
| :param str content_type: JSON by default, set application/xml if XML.
| :returns: An instance of this model
| :raises DeserializationError: if something went wrong
| :rtype: Self
|
| is_xml_model() -> bool
|
| ----------------------------------------------------------------------
| Data descriptors inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from azure.storage.blob._generated._utils.serialization.Model:
|
| __hash__ = None
azure-storage-blob.StorageErrorCode
Python Library Documentation: class StorageErrorCode in module azure.storage.blob._shared.models
class StorageErrorCode(builtins.str, enum.Enum)
| StorageErrorCode(*values)
|
| Error codes returned by the service.
|
| Method resolution order:
| StorageErrorCode
| builtins.str
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec) from enum.Enum
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self) from enum.Enum
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ACCOUNT_ALREADY_EXISTS = <StorageErrorCode.ACCOUNT_ALREADY_EXISTS: 'Ac...
|
| ACCOUNT_BEING_CREATED = <StorageErrorCode.ACCOUNT_BEING_CREATED: 'Acco...
|
| ACCOUNT_IS_DISABLED = <StorageErrorCode.ACCOUNT_IS_DISABLED: 'AccountI...
|
| APPEND_POSITION_CONDITION_NOT_MET = <StorageErrorCode.APPEND_POSITION_...
|
| AUTHENTICATION_FAILED = <StorageErrorCode.AUTHENTICATION_FAILED: 'Auth...
|
| AUTHORIZATION_FAILURE = <StorageErrorCode.AUTHORIZATION_FAILURE: 'Auth...
|
| BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE = <StorageErrorCode.BL...
|
| BLOB_ALREADY_EXISTS = <StorageErrorCode.BLOB_ALREADY_EXISTS: 'BlobAlre...
|
| BLOB_ARCHIVED = <StorageErrorCode.BLOB_ARCHIVED: 'BlobArchived'>
|
| BLOB_BEING_REHYDRATED = <StorageErrorCode.BLOB_BEING_REHYDRATED: 'Blob...
|
| BLOB_NOT_ARCHIVED = <StorageErrorCode.BLOB_NOT_ARCHIVED: 'BlobNotArchi...
|
| BLOB_NOT_FOUND = <StorageErrorCode.BLOB_NOT_FOUND: 'BlobNotFound'>
|
| BLOB_OVERWRITTEN = <StorageErrorCode.BLOB_OVERWRITTEN: 'BlobOverwritte...
|
| BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH = <StorageErrorCode.BLOB_TIER_...
|
| BLOCK_COUNT_EXCEEDS_LIMIT = <StorageErrorCode.BLOCK_COUNT_EXCEEDS_LIMI...
|
| BLOCK_LIST_TOO_LONG = <StorageErrorCode.BLOCK_LIST_TOO_LONG: 'BlockLis...
|
| CANNOT_CHANGE_TO_LOWER_TIER = <StorageErrorCode.CANNOT_CHANGE_TO_LOWER...
|
| CANNOT_DELETE_FILE_OR_DIRECTORY = <StorageErrorCode.CANNOT_DELETE_FILE...
|
| CANNOT_VERIFY_COPY_SOURCE = <StorageErrorCode.CANNOT_VERIFY_COPY_SOURC...
|
| CLIENT_CACHE_FLUSH_DELAY = <StorageErrorCode.CLIENT_CACHE_FLUSH_DELAY:...
|
| CONDITION_HEADERS_NOT_SUPPORTED = <StorageErrorCode.CONDITION_HEADERS_...
|
| CONDITION_NOT_MET = <StorageErrorCode.CONDITION_NOT_MET: 'ConditionNot...
|
| CONTAINER_ALREADY_EXISTS = <StorageErrorCode.CONTAINER_ALREADY_EXISTS:...
|
| CONTAINER_BEING_DELETED = <StorageErrorCode.CONTAINER_BEING_DELETED: '...
|
| CONTAINER_DISABLED = <StorageErrorCode.CONTAINER_DISABLED: 'ContainerD...
|
| CONTAINER_NOT_FOUND = <StorageErrorCode.CONTAINER_NOT_FOUND: 'Containe...
|
| CONTAINER_QUOTA_DOWNGRADE_NOT_ALLOWED = <StorageErrorCode.CONTAINER_QU...
|
| CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT = <StorageErrorCode.CONTENT_LENG...
|
| CONTENT_LENGTH_MUST_BE_ZERO = <StorageErrorCode.CONTENT_LENGTH_MUST_BE...
|
| COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = <StorageErrorCode.COPY_ACROSS_ACC...
|
| COPY_ID_MISMATCH = <StorageErrorCode.COPY_ID_MISMATCH: 'CopyIdMismatch...
|
| DELETE_PENDING = <StorageErrorCode.DELETE_PENDING: 'DeletePending'>
|
| DESTINATION_PATH_IS_BEING_DELETED = <StorageErrorCode.DESTINATION_PATH...
|
| DIRECTORY_NOT_EMPTY = <StorageErrorCode.DIRECTORY_NOT_EMPTY: 'Director...
|
| EMPTY_METADATA_KEY = <StorageErrorCode.EMPTY_METADATA_KEY: 'EmptyMetad...
|
| FEATURE_VERSION_MISMATCH = <StorageErrorCode.FEATURE_VERSION_MISMATCH:...
|
| FILE_LOCK_CONFLICT = <StorageErrorCode.FILE_LOCK_CONFLICT: 'FileLockCo...
|
| FILE_SHARE_PROVISIONED_BANDWIDTH_DOWNGRADE_NOT_ALLOWED = <StorageError...
|
| FILE_SHARE_PROVISIONED_BANDWIDTH_INVALID = <StorageErrorCode.FILE_SHAR...
|
| FILE_SHARE_PROVISIONED_IOPS_DOWNGRADE_NOT_ALLOWED = <StorageErrorCode....
|
| FILE_SHARE_PROVISIONED_IOPS_INVALID = <StorageErrorCode.FILE_SHARE_PRO...
|
| FILE_SHARE_PROVISIONED_STORAGE_INVALID = <StorageErrorCode.FILE_SHARE_...
|
| FILE_SYSTEM_ALREADY_EXISTS = <StorageErrorCode.FILE_SYSTEM_ALREADY_EXI...
|
| FILE_SYSTEM_BEING_DELETED = <StorageErrorCode.FILE_SYSTEM_BEING_DELETE...
|
| FILE_SYSTEM_NOT_FOUND = <StorageErrorCode.FILE_SYSTEM_NOT_FOUND: 'File...
|
| INCREMENTAL_COPY_BLOB_MISMATCH = <StorageErrorCode.INCREMENTAL_COPY_BL...
|
| INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED = <StorageErrorCode.I...
|
| INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED = <StorageErr...
|
| INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT = <StorageErrorCode.INCREMENT...
|
| INFINITE_LEASE_DURATION_REQUIRED = <StorageErrorCode.INFINITE_LEASE_DU...
|
| INSUFFICIENT_ACCOUNT_PERMISSIONS = <StorageErrorCode.INSUFFICIENT_ACCO...
|
| INTERNAL_ERROR = <StorageErrorCode.INTERNAL_ERROR: 'InternalError'>
|
| INVALID_AUTHENTICATION_INFO = <StorageErrorCode.INVALID_AUTHENTICATION...
|
| INVALID_BLOB_OR_BLOCK = <StorageErrorCode.INVALID_BLOB_OR_BLOCK: 'Inva...
|
| INVALID_BLOB_TIER = <StorageErrorCode.INVALID_BLOB_TIER: 'InvalidBlobT...
|
| INVALID_BLOB_TYPE = <StorageErrorCode.INVALID_BLOB_TYPE: 'InvalidBlobT...
|
| INVALID_BLOCK_ID = <StorageErrorCode.INVALID_BLOCK_ID: 'InvalidBlockId...
|
| INVALID_BLOCK_LIST = <StorageErrorCode.INVALID_BLOCK_LIST: 'InvalidBlo...
|
| INVALID_DESTINATION_PATH = <StorageErrorCode.INVALID_DESTINATION_PATH:...
|
| INVALID_FILE_OR_DIRECTORY_PATH_NAME = <StorageErrorCode.INVALID_FILE_O...
|
| INVALID_FLUSH_POSITION = <StorageErrorCode.INVALID_FLUSH_POSITION: 'In...
|
| INVALID_HEADER_VALUE = <StorageErrorCode.INVALID_HEADER_VALUE: 'Invali...
|
| INVALID_HTTP_VERB = <StorageErrorCode.INVALID_HTTP_VERB: 'InvalidHttpV...
|
| INVALID_INPUT = <StorageErrorCode.INVALID_INPUT: 'InvalidInput'>
|
| INVALID_MARKER = <StorageErrorCode.INVALID_MARKER: 'InvalidMarker'>
|
| INVALID_MD5 = <StorageErrorCode.INVALID_MD5: 'InvalidMd5'>
|
| INVALID_METADATA = <StorageErrorCode.INVALID_METADATA: 'InvalidMetadat...
|
| INVALID_OPERATION = <StorageErrorCode.INVALID_OPERATION: 'InvalidOpera...
|
| INVALID_PAGE_RANGE = <StorageErrorCode.INVALID_PAGE_RANGE: 'InvalidPag...
|
| INVALID_PROPERTY_NAME = <StorageErrorCode.INVALID_PROPERTY_NAME: 'Inva...
|
| INVALID_QUERY_PARAMETER_VALUE = <StorageErrorCode.INVALID_QUERY_PARAME...
|
| INVALID_RANGE = <StorageErrorCode.INVALID_RANGE: 'InvalidRange'>
|
| INVALID_RENAME_SOURCE_PATH = <StorageErrorCode.INVALID_RENAME_SOURCE_P...
|
| INVALID_RESOURCE_NAME = <StorageErrorCode.INVALID_RESOURCE_NAME: 'Inva...
|
| INVALID_SOURCE_BLOB_TYPE = <StorageErrorCode.INVALID_SOURCE_BLOB_TYPE:...
|
| INVALID_SOURCE_BLOB_URL = <StorageErrorCode.INVALID_SOURCE_BLOB_URL: '...
|
| INVALID_SOURCE_OR_DESTINATION_RESOURCE_TYPE = <StorageErrorCode.INVALI...
|
| INVALID_SOURCE_URI = <StorageErrorCode.INVALID_SOURCE_URI: 'InvalidSou...
|
| INVALID_URI = <StorageErrorCode.INVALID_URI: 'InvalidUri'>
|
| INVALID_VERSION_FOR_PAGE_BLOB_OPERATION = <StorageErrorCode.INVALID_VE...
|
| INVALID_XML_DOCUMENT = <StorageErrorCode.INVALID_XML_DOCUMENT: 'Invali...
|
| INVALID_XML_NODE_VALUE = <StorageErrorCode.INVALID_XML_NODE_VALUE: 'In...
|
| LEASE_ALREADY_BROKEN = <StorageErrorCode.LEASE_ALREADY_BROKEN: 'LeaseA...
|
| LEASE_ALREADY_PRESENT = <StorageErrorCode.LEASE_ALREADY_PRESENT: 'Leas...
|
| LEASE_ID_MISMATCH_WITH_BLOB_OPERATION = <StorageErrorCode.LEASE_ID_MIS...
|
| LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION = <StorageErrorCode.LEASE_I...
|
| LEASE_ID_MISMATCH_WITH_LEASE_OPERATION = <StorageErrorCode.LEASE_ID_MI...
|
| LEASE_ID_MISSING = <StorageErrorCode.LEASE_ID_MISSING: 'LeaseIdMissing...
|
| LEASE_IS_ALREADY_BROKEN = <StorageErrorCode.LEASE_IS_ALREADY_BROKEN: '...
|
| LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED = <StorageErrorCode.LEASE_IS_...
|
| LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED = <StorageErrorCode.LEASE_IS_B...
|
| LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED = <StorageErrorCode.LEASE_IS_BRO...
|
| LEASE_LOST = <StorageErrorCode.LEASE_LOST: 'LeaseLost'>
|
| LEASE_NAME_MISMATCH = <StorageErrorCode.LEASE_NAME_MISMATCH: 'LeaseNam...
|
| LEASE_NOT_PRESENT_WITH_BLOB_OPERATION = <StorageErrorCode.LEASE_NOT_PR...
|
| LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION = <StorageErrorCode.LEASE_N...
|
| LEASE_NOT_PRESENT_WITH_LEASE_OPERATION = <StorageErrorCode.LEASE_NOT_P...
|
| MAX_BLOB_SIZE_CONDITION_NOT_MET = <StorageErrorCode.MAX_BLOB_SIZE_COND...
|
| MD5_MISMATCH = <StorageErrorCode.MD5_MISMATCH: 'Md5Mismatch'>
|
| MESSAGE_NOT_FOUND = <StorageErrorCode.MESSAGE_NOT_FOUND: 'MessageNotFo...
|
| MESSAGE_TOO_LARGE = <StorageErrorCode.MESSAGE_TOO_LARGE: 'MessageTooLa...
|
| METADATA_TOO_LARGE = <StorageErrorCode.METADATA_TOO_LARGE: 'MetadataTo...
|
| MISSING_CONTENT_LENGTH_HEADER = <StorageErrorCode.MISSING_CONTENT_LENG...
|
| MISSING_REQUIRED_HEADER = <StorageErrorCode.MISSING_REQUIRED_HEADER: '...
|
| MISSING_REQUIRED_QUERY_PARAMETER = <StorageErrorCode.MISSING_REQUIRED_...
|
| MISSING_REQUIRED_XML_NODE = <StorageErrorCode.MISSING_REQUIRED_XML_NOD...
|
| MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = <StorageErrorCode.MULTIPLE_...
|
| NO_AUTHENTICATION_INFORMATION = <StorageErrorCode.NO_AUTHENTICATION_IN...
|
| NO_PENDING_COPY_OPERATION = <StorageErrorCode.NO_PENDING_COPY_OPERATIO...
|
| OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB = <StorageErrorCode.OPE...
|
| OPERATION_TIMED_OUT = <StorageErrorCode.OPERATION_TIMED_OUT: 'Operatio...
|
| OUT_OF_RANGE_INPUT = <StorageErrorCode.OUT_OF_RANGE_INPUT: 'OutOfRange...
|
| OUT_OF_RANGE_QUERY_PARAMETER_VALUE = <StorageErrorCode.OUT_OF_RANGE_QU...
|
| PARENT_NOT_FOUND = <StorageErrorCode.PARENT_NOT_FOUND: 'ParentNotFound...
|
| PATH_ALREADY_EXISTS = <StorageErrorCode.PATH_ALREADY_EXISTS: 'PathAlre...
|
| PATH_CONFLICT = <StorageErrorCode.PATH_CONFLICT: 'PathConflict'>
|
| PATH_NOT_FOUND = <StorageErrorCode.PATH_NOT_FOUND: 'PathNotFound'>
|
| PENDING_COPY_OPERATION = <StorageErrorCode.PENDING_COPY_OPERATION: 'Pe...
|
| POP_RECEIPT_MISMATCH = <StorageErrorCode.POP_RECEIPT_MISMATCH: 'PopRec...
|
| PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = <StorageErrorCode.PREVIOUS_SNAPSHO...
|
| PREVIOUS_SNAPSHOT_NOT_FOUND = <StorageErrorCode.PREVIOUS_SNAPSHOT_NOT_...
|
| PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED = <StorageErrorCode.PREVIOUS...
|
| QUEUE_ALREADY_EXISTS = <StorageErrorCode.QUEUE_ALREADY_EXISTS: 'QueueA...
|
| QUEUE_BEING_DELETED = <StorageErrorCode.QUEUE_BEING_DELETED: 'QueueBei...
|
| QUEUE_DISABLED = <StorageErrorCode.QUEUE_DISABLED: 'QueueDisabled'>
|
| QUEUE_NOT_EMPTY = <StorageErrorCode.QUEUE_NOT_EMPTY: 'QueueNotEmpty'>
|
| QUEUE_NOT_FOUND = <StorageErrorCode.QUEUE_NOT_FOUND: 'QueueNotFound'>
|
| READ_ONLY_ATTRIBUTE = <StorageErrorCode.READ_ONLY_ATTRIBUTE: 'ReadOnly...
|
| RENAME_DESTINATION_PARENT_PATH_NOT_FOUND = <StorageErrorCode.RENAME_DE...
|
| REQUEST_BODY_TOO_LARGE = <StorageErrorCode.REQUEST_BODY_TOO_LARGE: 'Re...
|
| REQUEST_URL_FAILED_TO_PARSE = <StorageErrorCode.REQUEST_URL_FAILED_TO_...
|
| RESOURCE_ALREADY_EXISTS = <StorageErrorCode.RESOURCE_ALREADY_EXISTS: '...
|
| RESOURCE_NOT_FOUND = <StorageErrorCode.RESOURCE_NOT_FOUND: 'ResourceNo...
|
| RESOURCE_TYPE_MISMATCH = <StorageErrorCode.RESOURCE_TYPE_MISMATCH: 'Re...
|
| SEQUENCE_NUMBER_CONDITION_NOT_MET = <StorageErrorCode.SEQUENCE_NUMBER_...
|
| SEQUENCE_NUMBER_INCREMENT_TOO_LARGE = <StorageErrorCode.SEQUENCE_NUMBE...
|
| SERVER_BUSY = <StorageErrorCode.SERVER_BUSY: 'ServerBusy'>
|
| SHARE_ALREADY_EXISTS = <StorageErrorCode.SHARE_ALREADY_EXISTS: 'ShareA...
|
| SHARE_BEING_DELETED = <StorageErrorCode.SHARE_BEING_DELETED: 'ShareBei...
|
| SHARE_DISABLED = <StorageErrorCode.SHARE_DISABLED: 'ShareDisabled'>
|
| SHARE_HAS_SNAPSHOTS = <StorageErrorCode.SHARE_HAS_SNAPSHOTS: 'ShareHas...
|
| SHARE_NOT_FOUND = <StorageErrorCode.SHARE_NOT_FOUND: 'ShareNotFound'>
|
| SHARE_SNAPSHOT_COUNT_EXCEEDED = <StorageErrorCode.SHARE_SNAPSHOT_COUNT...
|
| SHARE_SNAPSHOT_IN_PROGRESS = <StorageErrorCode.SHARE_SNAPSHOT_IN_PROGR...
|
| SHARE_SNAPSHOT_NOT_FOUND = <StorageErrorCode.SHARE_SNAPSHOT_NOT_FOUND:...
|
| SHARE_SNAPSHOT_OPERATION_NOT_SUPPORTED = <StorageErrorCode.SHARE_SNAPS...
|
| SHARING_VIOLATION = <StorageErrorCode.SHARING_VIOLATION: 'SharingViola...
|
| SNAPSHOTS_PRESENT = <StorageErrorCode.SNAPSHOTS_PRESENT: 'SnapshotsPre...
|
| SNAPSHOT_COUNT_EXCEEDED = <StorageErrorCode.SNAPSHOT_COUNT_EXCEEDED: '...
|
| SNAPSHOT_OPERATION_RATE_EXCEEDED = <StorageErrorCode.SNAPSHOT_OPERATIO...
|
| SOURCE_CONDITION_NOT_MET = <StorageErrorCode.SOURCE_CONDITION_NOT_MET:...
|
| SOURCE_PATH_IS_BEING_DELETED = <StorageErrorCode.SOURCE_PATH_IS_BEING_...
|
| SOURCE_PATH_NOT_FOUND = <StorageErrorCode.SOURCE_PATH_NOT_FOUND: 'Sour...
|
| SYSTEM_IN_USE = <StorageErrorCode.SYSTEM_IN_USE: 'SystemInUse'>
|
| TARGET_CONDITION_NOT_MET = <StorageErrorCode.TARGET_CONDITION_NOT_MET:...
|
| TOTAL_SHARES_COUNT_EXCEEDS_ACCOUNT_LIMIT = <StorageErrorCode.TOTAL_SHA...
|
| TOTAL_SHARES_PROVISIONED_BANDWIDTH_EXCEEDS_ACCOUNT_LIMIT = <StorageErr...
|
| TOTAL_SHARES_PROVISIONED_CAPACITY_EXCEEDS_ACCOUNT_LIMIT = <StorageErro...
|
| TOTAL_SHARES_PROVISIONED_IOPS_EXCEEDS_ACCOUNT_LIMIT = <StorageErrorCod...
|
| UNAUTHORIZED_BLOB_OVERWRITE = <StorageErrorCode.UNAUTHORIZED_BLOB_OVER...
|
| UNSUPPORTED_HEADER = <StorageErrorCode.UNSUPPORTED_HEADER: 'Unsupporte...
|
| UNSUPPORTED_HTTP_VERB = <StorageErrorCode.UNSUPPORTED_HTTP_VERB: 'Unsu...
|
| UNSUPPORTED_QUERY_PARAMETER = <StorageErrorCode.UNSUPPORTED_QUERY_PARA...
|
| UNSUPPORTED_REST_VERSION = <StorageErrorCode.UNSUPPORTED_REST_VERSION:...
|
| UNSUPPORTED_XML_NODE = <StorageErrorCode.UNSUPPORTED_XML_NODE: 'Unsupp...
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
azure-storage-blob.StorageStreamDownloader
Python Library Documentation: class StorageStreamDownloader in module azure.storage.blob._download
class StorageStreamDownloader(typing.Generic)
| StorageStreamDownloader(clients: 'AzureBlobStorage' = None, config: 'StorageConfiguration' = None, start_range: Optional[int] = None, end_range: Optional[int] = None, validate_content: bool = None, encryption_options: Dict[str, Any] = None, max_concurrency: Optional[int] = None, name: str = None, container: str = None, encoding: Optional[str] = None, download_cls: Optional[Callable] = None, **kwargs: Any) -> None
|
| A streaming object to download from Azure Storage.
|
| Method resolution order:
| StorageStreamDownloader
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__(self, clients: 'AzureBlobStorage' = None, config: 'StorageConfiguration' = None, start_range: Optional[int] = None, end_range: Optional[int] = None, validate_content: bool = None, encryption_options: Dict[str, Any] = None, max_concurrency: Optional[int] = None, name: str = None, container: str = None, encoding: Optional[str] = None, download_cls: Optional[Callable] = None, **kwargs: Any) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __len__(self)
|
| chunks(self) -> Iterator[bytes]
| Iterate over chunks in the download stream. Note, the iterator returned will
| iterate over the entire download content, regardless of any data that was
| previously read.
|
| NOTE: If the stream has been partially read, some data may be re-downloaded by the iterator.
|
| :return: An iterator of the chunks in the download stream.
| :rtype: Iterator[bytes]
|
| .. admonition:: Example:
|
| .. literalinclude:: ../samples/blob_samples_hello_world.py
| :start-after: [START download_a_blob_in_chunk]
| :end-before: [END download_a_blob_in_chunk]
| :language: python
| :dedent: 12
| :caption: Download a blob using chunks().
|
| content_as_bytes(self, max_concurrency=None)
| DEPRECATED: Download the contents of this file.
|
| This operation is blocking until all data is downloaded.
|
| This method is deprecated, use func:`readall` instead.
|
| :param Optional[int] max_concurrency:
| The number of parallel connections with which to download.
| :return: The contents of the file as bytes.
| :rtype: bytes
|
| content_as_text(self, max_concurrency=None, encoding='UTF-8')
| DEPRECATED: Download the contents of this blob, and decode as text.
|
| This operation is blocking until all data is downloaded.
|
| This method is deprecated, use func:`readall` instead.
|
| :param Optional[int] max_concurrency:
| The number of parallel connections with which to download.
| :param str encoding:
| Test encoding to decode the downloaded bytes. Default is UTF-8.
| :return: The content of the file as a str.
| :rtype: str
|
| download_to_stream(self, stream, max_concurrency=None)
| DEPRECATED: Download the contents of this blob to a stream.
|
| This method is deprecated, use func:`readinto` instead.
|
| :param IO[T] stream:
| The stream to download to. This can be an open file-handle,
| or any writable stream. The stream must be seekable if the download
| uses more than one parallel connection.
| :param Optional[int] max_concurrency:
| The number of parallel connections with which to download.
| :return: The properties of the downloaded blob.
| :rtype: Any
|
| read(self, size: int = -1, *, chars: Optional[int] = None) -> ~T
| Read the specified bytes or chars from the stream. If `encoding`
| was specified on `download_blob`, it is recommended to use the
| chars parameter to read a specific number of chars to avoid decoding
| errors. If size/chars is unspecified or negative all bytes will be read.
|
| :param int size:
| The number of bytes to download from the stream. Leave unspecified
| or set negative to download all bytes.
| :keyword Optional[int] chars:
| The number of chars to download from the stream. Leave unspecified
| or set negative to download all chars. Note, this can only be used
| when encoding is specified on `download_blob`.
| :return:
| The requested data as bytes or a string if encoding was specified. If
| the return value is empty, there is no more data to read.
| :rtype: T
|
| readall(self) -> ~T
| Read the entire contents of this blob.
| This operation is blocking until all data is downloaded.
|
| :return: The requested data as bytes or a string if encoding was specified.
| :rtype: T
|
| readinto(self, stream: IO[bytes]) -> int
| Download the contents of this file to a stream.
|
| :param IO[bytes] stream:
| The stream to download to. This can be an open file-handle,
| or any writable stream. The stream must be seekable if the download
| uses more than one parallel connection.
| :return: The number of bytes read.
| :rtype: int
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'container': <class 'str'>, 'name': <class 'str'>, ...
|
| __orig_bases__ = (typing.Generic[~T],)
|
| __parameters__ = (~T,)
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
|
| __init_subclass__(...)
| Function to initialize subclasses.
azure-storage-blob.TYPE_CHECKING
Python Library Documentation: bool object class bool(int) | bool(x) -> bool | | Returns True when the argument x is true, False otherwise. | The builtins True and False are the only two instances of the class bool. | The class bool is a subclass of the class int, and cannot be subclassed. | | Method resolution order: | bool | int | object | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __invert__(self, /) | ~self | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rxor__(self, value, /) | Return value^self. | | __xor__(self, value, /) | Return self^value. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __format__(self, format_spec, /) | Convert to a string according to format_spec. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number
azure-storage-blob.Union
Python Library Documentation: _SpecialForm in module typing
Union = typing.Union
Union type; Union[X, Y] means either X or Y.
On Python 3.10 and higher, the | operator
can also be used to denote unions;
X | Y means the same thing to the type checker as Union[X, Y].
To define a union, use e.g. Union[int, str]. Details:
- The arguments must be types and there must be at least one.
- None as an argument is a special case and is replaced by
type(None).
- Unions of unions are flattened, e.g.::
assert Union[Union[int, str], float] == Union[int, str, float]
- Unions of a single argument vanish, e.g.::
assert Union[int] == int # The constructor actually returns int
- Redundant arguments are skipped, e.g.::
assert Union[int, str, int] == Union[int, str]
- When comparing unions, the argument order is ignored, e.g.::
assert Union[int, str] == Union[str, int]
- You cannot subclass or instantiate a union.
- You can use Optional[X] as a shorthand for Union[X, None].
azure-storage-blob.UserDelegationKey
Python Library Documentation: class UserDelegationKey in module azure.storage.blob._shared.models
class UserDelegationKey(builtins.object)
| Represents a user delegation key, provided to the user by Azure Storage
| based on their Azure Active Directory access token.
|
| The fields are saved as simple strings since the user does not have to interact with this object;
| to generate an identify SAS, the user can simply pass it to the right API.
|
| Methods defined here:
|
| __init__(self)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'signed_delegated_user_tid': typing.Optional[str], ...
|
| signed_delegated_user_tid = None
|
| signed_expiry = None
|
| signed_oid = None
|
| signed_service = None
|
| signed_start = None
|
| signed_tid = None
|
| signed_version = None
|
| value = None
azure-storage-blob.VERSION
Error rendering doc: No Python documentation found for '12.30.0'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
azure-storage-blob.cast
Python Library Documentation: function cast in module typing
cast(typ, val)
Cast a value to a type.
This returns the value unchanged. To the type checker this
signals that the return value has the designated type, but at
runtime we intentionally don't check anything (we want this
to be as fast as possible).
azure-storage-blob.download_blob_from_url
Python Library Documentation: function download_blob_from_url in module azure.storage.blob
download_blob_from_url(blob_url: str, output: Union[str, IO[bytes]], credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> None
Download the contents of a blob to a local file or stream.
:param str blob_url:
The full URI to the blob. This can also include a SAS token.
:param output:
Where the data should be downloaded to. This could be either a file path to write to,
or an open IO handle to write to.
:type output: str or IO.
:param credential:
The credentials with which to authenticate. This is optional if the
blob URL already has a SAS token or the blob is public. The value can be a SAS token string,
an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
an account shared access key, or an instance of a TokenCredentials class from azure.identity.
If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
should be the storage account key.
:type credential:
~azure.core.credentials.AzureNamedKeyCredential or
~azure.core.credentials.AzureSasCredential or
~azure.core.credentials.TokenCredential or
str or dict[str, str] or None
:keyword bool overwrite:
Whether the local file should be overwritten if it already exists. The default value is
`False` - in which case a ValueError will be raised if the file already exists. If set to
`True`, an attempt will be made to write to the existing file. If a stream handle is passed
in, this value is ignored.
:keyword int max_concurrency:
The number of parallel connections with which to download.
:keyword int offset:
Start of byte range to use for downloading a section of the blob.
Must be set if length is provided.
:keyword int length:
Number of bytes to read from the stream. This is optional, but
should be supplied for optimal performance.
:keyword bool validate_content:
If true, calculates an MD5 hash for each chunk of the blob. The storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob. Also note that if enabled, the memory-efficient upload algorithm
will not be used, because computing the MD5 hash requires buffering
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
:return: None
:rtype: None
azure-storage-blob.generate_account_sas
Python Library Documentation: function generate_account_sas in module azure.storage.blob._shared_access_signature
generate_account_sas(account_name: str, account_key: str, resource_types: Union[ForwardRef('ResourceTypes'), str], permission: Union[ForwardRef('AccountSasPermissions'), str], expiry: Union[ForwardRef('datetime'), str], start: Union[ForwardRef('datetime'), str, NoneType] = None, ip: Optional[str] = None, *, services: Union[azure.storage.blob._shared.models.Services, str] = <azure.storage.blob._shared.models.Services object at 0x000002835C2FEC00>, sts_hook: Optional[Callable[[str], NoneType]] = None, **kwargs: Any) -> str
Generates a shared access signature for the blob service.
Use the returned signature with the credential parameter of any BlobServiceClient,
ContainerClient or BlobClient.
:param str account_name:
The storage account name used to generate the shared access signature.
:param str account_key:
The account key, also called shared key or access key, to generate the shared access signature.
:param resource_types:
Specifies the resource types that are accessible with the account SAS.
:type resource_types: str or ~azure.storage.blob.ResourceTypes
:param permission:
The permissions associated with the shared access signature. The
user is restricted to operations allowed by the permissions.
:type permission: str or ~azure.storage.blob.AccountSasPermissions
:param expiry:
The time at which the shared access signature becomes invalid.
The provided datetime will always be interpreted as UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
If the IP address from which the request originates does not match the IP address
or address range specified on the SAS token, the request is not authenticated.
For example, specifying ip=168.1.5.65 or ip=168.1.5.60-168.1.5.70 on the SAS
restricts the request to those IP addresses.
:keyword Union[Services, str] services:
Specifies the services that the Shared Access Signature (sas) token will be able to be utilized with.
Will default to only this package (i.e. blobs) if not provided.
:keyword str protocol:
Specifies the protocol permitted for a request made. The default value is https.
:keyword str encryption_scope:
Specifies the encryption scope for a request made so that all write operations will be service encrypted.
:keyword sts_hook:
For debugging purposes only. If provided, the hook is called with the string to sign
that was used to generate the SAS.
:paramtype sts_hook: Optional[Callable[[str], None]]
:return: A Shared Access Signature (sas) token.
:rtype: str
.. admonition:: Example:
.. literalinclude:: ../samples/blob_samples_authentication.py
:start-after: [START create_sas_token]
:end-before: [END create_sas_token]
:language: python
:dedent: 8
:caption: Generating a shared access signature.
azure-storage-blob.generate_blob_sas
Python Library Documentation: function generate_blob_sas in module azure.storage.blob._shared_access_signature
generate_blob_sas(account_name: str, container_name: str, blob_name: str, snapshot: Optional[str] = None, account_key: Optional[str] = None, user_delegation_key: Optional[azure.storage.blob._shared.models.UserDelegationKey] = None, permission: Union[ForwardRef('BlobSasPermissions'), str, NoneType] = None, expiry: Union[ForwardRef('datetime'), str, NoneType] = None, start: Union[ForwardRef('datetime'), str, NoneType] = None, policy_id: Optional[str] = None, ip: Optional[str] = None, *, user_delegation_oid: Optional[str] = None, request_headers: Optional[Dict[str, str]] = None, request_query_params: Optional[Dict[str, str]] = None, is_directory: Optional[bool] = None, sts_hook: Optional[Callable[[str], NoneType]] = None, **kwargs: Any) -> str
Generates a shared access signature for a blob.
Use the returned signature with the credential parameter of any BlobServiceClient,
ContainerClient or BlobClient.
:param str account_name:
The storage account name used to generate the shared access signature.
:param str container_name:
The name of the container.
:param str blob_name:
The name of the blob.
:param str snapshot:
An optional blob snapshot ID.
:param str account_key:
The account key, also called shared key or access key, to generate the shared access signature.
Either `account_key` or `user_delegation_key` must be specified.
:param ~azure.storage.blob.UserDelegationKey user_delegation_key:
Instead of an account shared key, the user could pass in a user delegation key.
A user delegation key can be obtained from the service by authenticating with an AAD identity;
this can be accomplished by calling :func:`~azure.storage.blob.BlobServiceClient.get_user_delegation_key`.
When present, the SAS is signed with the user delegation key instead.
:param permission:
The permissions associated with the shared access signature. The
user is restricted to operations allowed by the permissions.
Permissions must be ordered racwdxytmei.
Required unless an id is given referencing a stored access policy
which contains this field. This field must be omitted if it has been
specified in an associated stored access policy.
:type permission: str or ~azure.storage.blob.BlobSasPermissions
:param expiry:
The time at which the shared access signature becomes invalid.
Required unless an id is given referencing a stored access policy
which contains this field. This field must be omitted if it has
been specified in an associated stored access policy. Azure will always
convert values to UTC. If a date is passed in without timezone info, it
is assumed to be UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
stored access policy. To create a stored access policy, use
:func:`~azure.storage.blob.ContainerClient.set_container_access_policy()`.
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
If the IP address from which the request originates does not match the IP address
or address range specified on the SAS token, the request is not authenticated.
For example, specifying ip=168.1.5.65 or ip=168.1.5.60-168.1.5.70 on the SAS
restricts the request to those IP addresses.
:keyword str version_id:
An optional blob version ID. This parameter is only applicable for versioning-enabled
Storage accounts. Note that the 'versionid' query parameter is not included in the output
SAS. Therefore, please provide the 'version_id' parameter to any APIs when using the output
SAS to operate on a specific version.
.. versionadded:: 12.4.0
This keyword argument was introduced in API version '2019-12-12'.
:keyword str protocol:
Specifies the protocol permitted for a request made. The default value is https.
:keyword str cache_control:
Response header value for Cache-Control when resource is accessed
using this shared access signature.
:keyword str content_disposition:
Response header value for Content-Disposition when resource is accessed
using this shared access signature.
:keyword str content_encoding:
Response header value for Content-Encoding when resource is accessed
using this shared access signature.
:keyword str content_language:
Response header value for Content-Language when resource is accessed
using this shared access signature.
:keyword str content_type:
Response header value for Content-Type when resource is accessed
using this shared access signature.
:keyword str encryption_scope:
Specifies the encryption scope for a request made so that all write operations will be service encrypted.
:keyword str correlation_id:
The correlation id to correlate the storage audit logs with the audit logs used by the principal
generating and distributing the SAS. This can only be used when generating a SAS with delegation key.
:keyword str user_delegation_oid:
Specifies the Entra ID of the user that is authorized to use the resulting SAS URL.
The resulting SAS URL must be used in conjunction with an Entra ID token that has been
issued to the user specified in this value.
:keyword Dict[str, str] request_headers:
If specified, both the correct request header(s) and corresponding values must be present,
or the request will fail.
:keyword Dict[str, str] request_query_params:
If specified, both the correct query parameter(s) and corresponding values must be present,
or the request will fail.
:keyword Optional[bool] is_directory:
Specifies whether the `blob_name` is a virtual directory. If set, the `blob_name` is treated
to be a virtual directory name for a Directory SAS. When set, do not prefix or suffix the `blob_name`
with `/`. If not set, the `blob_name` is assumed to be a blob name for a Blob SAS.
:keyword sts_hook:
For debugging purposes only. If provided, the hook is called with the string to sign
that was used to generate the SAS.
:paramtype sts_hook: Optional[Callable[[str], None]]
:return: A Shared Access Signature (sas) token.
:rtype: str
azure-storage-blob.generate_container_sas
Python Library Documentation: function generate_container_sas in module azure.storage.blob._shared_access_signature
generate_container_sas(account_name: str, container_name: str, account_key: Optional[str] = None, user_delegation_key: Optional[azure.storage.blob._shared.models.UserDelegationKey] = None, permission: Union[ForwardRef('ContainerSasPermissions'), str, NoneType] = None, expiry: Union[ForwardRef('datetime'), str, NoneType] = None, start: Union[ForwardRef('datetime'), str, NoneType] = None, policy_id: Optional[str] = None, ip: Optional[str] = None, *, user_delegation_oid: Optional[str] = None, request_headers: Optional[Dict[str, str]] = None, request_query_params: Optional[Dict[str, str]] = None, sts_hook: Optional[Callable[[str], NoneType]] = None, **kwargs: Any) -> str
Generates a shared access signature for a container.
Use the returned signature with the credential parameter of any BlobServiceClient,
ContainerClient or BlobClient.
:param str account_name:
The storage account name used to generate the shared access signature.
:param str container_name:
The name of the container.
:param str account_key:
The account key, also called shared key or access key, to generate the shared access signature.
Either `account_key` or `user_delegation_key` must be specified.
:param ~azure.storage.blob.UserDelegationKey user_delegation_key:
Instead of an account shared key, the user could pass in a user delegation key.
A user delegation key can be obtained from the service by authenticating with an AAD identity;
this can be accomplished by calling :func:`~azure.storage.blob.BlobServiceClient.get_user_delegation_key`.
When present, the SAS is signed with the user delegation key instead.
:param permission:
The permissions associated with the shared access signature. The
user is restricted to operations allowed by the permissions.
Permissions must be ordered racwdxyltfmei.
Required unless an id is given referencing a stored access policy
which contains this field. This field must be omitted if it has been
specified in an associated stored access policy.
:type permission: str or ~azure.storage.blob.ContainerSasPermissions
:param expiry:
The time at which the shared access signature becomes invalid.
Required unless an id is given referencing a stored access policy
which contains this field. This field must be omitted if it has
been specified in an associated stored access policy. Azure will always
convert values to UTC. If a date is passed in without timezone info, it
is assumed to be UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
stored access policy. To create a stored access policy, use
:func:`~azure.storage.blob.ContainerClient.set_container_access_policy`.
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
If the IP address from which the request originates does not match the IP address
or address range specified on the SAS token, the request is not authenticated.
For example, specifying ip=168.1.5.65 or ip=168.1.5.60-168.1.5.70 on the SAS
restricts the request to those IP addresses.
:keyword str protocol:
Specifies the protocol permitted for a request made. The default value is https.
:keyword str cache_control:
Response header value for Cache-Control when resource is accessed
using this shared access signature.
:keyword str content_disposition:
Response header value for Content-Disposition when resource is accessed
using this shared access signature.
:keyword str content_encoding:
Response header value for Content-Encoding when resource is accessed
using this shared access signature.
:keyword str content_language:
Response header value for Content-Language when resource is accessed
using this shared access signature.
:keyword str content_type:
Response header value for Content-Type when resource is accessed
using this shared access signature.
:keyword str encryption_scope:
Specifies the encryption scope for a request made so that all write operations will be service encrypted.
:keyword str correlation_id:
The correlation id to correlate the storage audit logs with the audit logs used by the principal
generating and distributing the SAS. This can only be used when generating a SAS with delegation key.
:keyword str user_delegation_oid:
Specifies the Entra ID of the user that is authorized to use the resulting SAS URL.
The resulting SAS URL must be used in conjunction with an Entra ID token that has been
issued to the user specified in this value.
:keyword Dict[str, str] request_headers:
Specifies a set of headers and their corresponding values that
must be present in the request when using this SAS.
:keyword Dict[str, str] request_query_params:
Specifies a set of query parameters and their corresponding values that
must be present in the request when using this SAS.
:keyword sts_hook:
For debugging purposes only. If provided, the hook is called with the string to sign
that was used to generate the SAS.
:paramtype sts_hook: Optional[Callable[[str], None]]
:return: A Shared Access Signature (sas) token.
:rtype: str
.. admonition:: Example:
.. literalinclude:: ../samples/blob_samples_containers.py
:start-after: [START generate_sas_token]
:end-before: [END generate_sas_token]
:language: python
:dedent: 12
:caption: Generating a sas token.
azure-storage-blob.os
Python Library Documentation: module os
NAME
os - OS routines for NT or Posix depending on what system we're on.
MODULE REFERENCE
https://docs.python.org/3.12/library/os.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is a string representing the parent directory (always '..')
- os.sep is the (or a most common) pathname separator ('/' or '\\')
- os.extsep is the extension separator (always '.')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)
Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.object
nt.DirEntry
builtins.tuple(builtins.object)
nt.times_result
nt.uname_result
stat_result
statvfs_result
terminal_size
class DirEntry(builtins.object)
| Methods defined here:
|
| __fspath__(self, /)
| Returns the path for the entry.
|
| __repr__(self, /)
| Return repr(self).
|
| inode(self, /)
| Return inode of the entry; cached per entry.
|
| is_dir(self, /, *, follow_symlinks=True)
| Return True if the entry is a directory; cached per entry.
|
| is_file(self, /, *, follow_symlinks=True)
| Return True if the entry is a file; cached per entry.
|
| is_junction(self, /)
| Return True if the entry is a junction; cached per entry.
|
| is_symlink(self, /)
| Return True if the entry is a symbolic link; cached per entry.
|
| stat(self, /, *, follow_symlinks=True)
| Return stat_result object for the entry; cached per entry.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| the entry's base filename, relative to scandir() "path" argument
|
| path
| the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class stat_result(builtins.tuple)
| stat_result(iterable=(), /)
|
| stat_result: Result from stat, fstat, or lstat.
|
| This object may be accessed either as a tuple of
| (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
| or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.
|
| Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,
| or st_flags, they are available as attributes only.
|
| See os.stat for more information.
|
| Method resolution order:
| stat_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| st_atime
| time of last access
|
| st_atime_ns
| time of last access in nanoseconds
|
| st_birthtime
| time of creation
|
| st_birthtime_ns
| time of creation in nanoseconds
|
| st_ctime
| time of last change
|
| st_ctime_ns
| time of last change in nanoseconds
|
| st_dev
| device
|
| st_file_attributes
| Windows file attribute bits
|
| st_gid
| group ID of owner
|
| st_ino
| inode
|
| st_mode
| protection bits
|
| st_mtime
| time of last modification
|
| st_mtime_ns
| time of last modification in nanoseconds
|
| st_nlink
| number of hard links
|
| st_reparse_tag
| Windows reparse tag
|
| st_size
| total size, in bytes
|
| st_uid
| user ID of owner
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid',...
|
| n_fields = 20
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 3
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class statvfs_result(builtins.tuple)
| statvfs_result(iterable=(), /)
|
| statvfs_result: Result from statvfs or fstatvfs.
|
| This object may be accessed either as a tuple of
| (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),
| or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.
|
| See os.statvfs for more information.
|
| Method resolution order:
| statvfs_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| f_bavail
|
| f_bfree
|
| f_blocks
|
| f_bsize
|
| f_favail
|
| f_ffree
|
| f_files
|
| f_flag
|
| f_frsize
|
| f_fsid
|
| f_namemax
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('f_bsize', 'f_frsize', 'f_blocks', 'f_bfree', 'f_bav...
|
| n_fields = 11
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class terminal_size(builtins.tuple)
| terminal_size(iterable=(), /)
|
| A tuple of (columns, lines) for holding terminal window size
|
| Method resolution order:
| terminal_size
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| columns
| width of the terminal window in characters
|
| lines
| height of the terminal window in characters
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('columns', 'lines')
|
| n_fields = 2
|
| n_sequence_fields = 2
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class times_result(builtins.tuple)
| times_result(iterable=(), /)
|
| times_result: Result from os.times().
|
| This object may be accessed either as a tuple of
| (user, system, children_user, children_system, elapsed),
| or via the attributes user, system, children_user, children_system,
| and elapsed.
|
| See os.times for more information.
|
| Method resolution order:
| times_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| children_system
| system time of children
|
| children_user
| user time of children
|
| elapsed
| elapsed time since an arbitrary point in the past
|
| system
| system time
|
| user
| user time
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('user', 'system', 'children_user', 'children_system'...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class uname_result(builtins.tuple)
| uname_result(iterable=(), /)
|
| uname_result: Result from os.uname().
|
| This object may be accessed either as a tuple of
| (sysname, nodename, release, version, machine),
| or via the attributes sysname, nodename, release, version, and machine.
|
| See os.uname for more information.
|
| Method resolution order:
| uname_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| machine
| hardware identifier
|
| nodename
| name of machine on network (implementation-defined)
|
| release
| operating system release
|
| sysname
| operating system name
|
| version
| operating system version
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('sysname', 'nodename', 'release', 'version', 'machin...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
_exit(status)
Exit to the system with specified status, without normal exit processing.
abort()
Abort the interpreter immediately.
This function 'dumps core' or otherwise fails in the hardest way possible
on the hosting operating system. This function never returns.
access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
Use the real uid/gid to test for access to a path.
path
Path to be tested; can be string, bytes, or a path-like object.
mode
Operating-system mode bitfield. Can be F_OK to test existence,
or the inclusive-OR of R_OK, W_OK, and X_OK.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
effective_ids
If True, access will use the effective uid/gid instead of
the real uid/gid.
follow_symlinks
If False, and the last element of the path is a symbolic link,
access will examine the symbolic link itself instead of the file
the link points to.
dir_fd, effective_ids, and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
chdir(path)
Change the current working directory to the specified path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
chmod(path, mode, *, dir_fd=None, follow_symlinks=True)
Change the access permissions of a file.
path
Path to be modified. May always be specified as a str, bytes, or a path-like object.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
mode
Operating-system mode bitfield.
Be careful when using number literals for *mode*. The conventional UNIX notation for
numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in
Python.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
chmod will modify the symbolic link itself instead of the file
the link points to.
It is an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
dir_fd and follow_symlinks may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
close(fd)
Close a file descriptor.
closerange(fd_low, fd_high, /)
Closes all file descriptors in [fd_low, fd_high), ignoring errors.
cpu_count()
Return the number of CPUs in the system; return None if indeterminable.
This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``
device_encoding(fd)
Return a string describing the encoding of a terminal's file descriptor.
The file descriptor must be attached to a terminal.
If the device is not a terminal, return None.
dup(fd, /)
Return a duplicate of a file descriptor.
dup2(fd, fd2, inheritable=True)
Duplicate file descriptor.
execl(file, *args)
execl(file, *args)
Execute the executable file with argument list args, replacing the
current process.
execle(file, *args)
execle(file, *args, env)
Execute the executable file with argument list args and
environment env, replacing the current process.
execlp(file, *args)
execlp(file, *args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
execlpe(file, *args)
execlpe(file, *args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the current
process.
execv(path, argv, /)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
execve(path, argv, env)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
execvp(file, args)
execvp(file, args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tuple of strings.
execvpe(file, args, env)
execvpe(file, args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the
current process.
args may be a list or tuple of strings.
fdopen(fd, mode='r', buffering=-1, encoding=None, *args, **kwargs)
fsdecode(filename)
Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fspath(path)
Return the file system path representation of the object.
If the object is str or bytes, then allow it to pass through as-is. If the
object defines __fspath__(), then return the result of that method. All other
types raise a TypeError.
fstat(fd)
Perform a stat system call on the given file descriptor.
Like stat(), but for an open file descriptor.
Equivalent to os.stat(fd).
fsync(fd)
Force write of fd to disk.
ftruncate(fd, length, /)
Truncate a file, specified by file descriptor, to a specific length.
get_blocking(fd, /)
Get the blocking mode of the file descriptor.
Return False if the O_NONBLOCK flag is set, True if the flag is cleared.
get_exec_path(env=None)
Returns the sequence of directories that will be searched for the
named executable (similar to a shell) when launching a process.
*env* must be an environment variable dict or None. If *env* is None,
os.environ will be used.
get_handle_inheritable(handle, /)
Get the close-on-exe flag of the specified file descriptor.
get_inheritable(fd, /)
Get the close-on-exe flag of the specified file descriptor.
get_terminal_size(...)
Return the size of the terminal window as (columns, lines).
The optional argument fd (default standard output) specifies
which file descriptor should be queried.
If the file descriptor is not connected to a terminal, an OSError
is thrown.
This function will only be defined if an implementation is
available for this system.
shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.
getcwd()
Return a unicode string representing the current working directory.
getcwdb()
Return a bytes string representing the current working directory.
getenv(key, default=None)
Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternate default.
key, default and the result are str.
getlogin()
Return the actual login name.
getpid()
Return the current process id.
getppid()
Return the parent's process id.
If the parent process has already exited, Windows machines will still
return its id; others systems will return the id of the 'init' process (1).
isatty(fd, /)
Return True if the fd is connected to a terminal.
Return True if the file descriptor is an open file descriptor
connected to the slave end of a terminal.
kill(pid, signal, /)
Kill a process with a signal.
link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
platform. If they are unavailable, using them will raise a
NotImplementedError.
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
listdrives()
Return a list containing the names of drives in the system.
A drive name typically looks like 'C:\\'.
listmounts(volume)
Return a list containing mount points for a particular volume.
'volume' should be a GUID path as returned from os.listvolumes.
listvolumes()
Return a list containing the volumes in the system.
Volumes are typically represented as a GUID path.
lseek(fd, position, whence, /)
Set the position of a file descriptor. Return the new position.
fd
An open file descriptor, as returned by os.open().
position
Position, interpreted relative to 'whence'.
whence
The relative position to seek from. Valid values are:
- SEEK_SET: seek from the start of the file.
- SEEK_CUR: seek from the current file position.
- SEEK_END: seek from the end of the file.
The return value is the number of bytes relative to the beginning of the file.
lstat(path, *, dir_fd=None)
Perform a stat system call on the given path, without following symbolic links.
Like stat(), but do not follow symbolic links.
Equivalent to stat(path, follow_symlinks=False).
makedirs(name, mode=511, exist_ok=False)
makedirs(name [, mode=0o777][, exist_ok=False])
Super-mkdir; create a leaf directory and all intermediate ones. Works like
mkdir, except that any intermediate path segment (not just the rightmost)
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.
mkdir(path, mode=511, *, dir_fd=None)
Create a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
The mode argument is ignored on Windows. Where it is used, the current umask
value is first masked out.
open(path, flags, mode=511, *, dir_fd=None)
Open a file for low level IO. Returns a file descriptor (integer).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
pipe()
Create a pipe.
Returns a tuple of two file descriptors:
(read_fd, write_fd)
popen(cmd, mode='r', buffering=-1)
putenv(name, value, /)
Change or add an environment variable.
read(fd, length, /)
Read from a file descriptor. Returns a bytes object.
readlink(path, *, dir_fd=None)
Return a string representing the path to which the symbolic link points.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform. If it is unavailable,
using it will raise a NotImplementedError.
remove(path, *, dir_fd=None)
Remove a file (same as unlink()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
removedirs(name)
removedirs(name)
Super-rmdir; remove a leaf directory and all empty intermediate
ones. Works like rmdir except that, if the leaf directory is
successfully removed, directories corresponding to rightmost path
segments will be pruned away until either the whole path is
consumed or an error occurs. Errors during this latter phase are
ignored -- they generally mean that a directory was not empty.
rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
renames(old, new)
renames(old, new)
Super-rename; create directories as necessary and delete any left
empty. Works like rename, except creation of any intermediate
directories needed to make the new pathname good is attempted
first. After the rename, directories corresponding to rightmost
path segments of the old name will be pruned until either the
whole path is consumed or a nonempty directory is found.
Note: this function can fail with the new directory structure made
if you lack permissions needed to unlink the leaf directory or
file.
replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory, overwriting the destination.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
rmdir(path, *, dir_fd=None)
Remove a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
scandir(path=None)
Return an iterator of DirEntry objects for given path.
path can be specified as either str, bytes, or a path-like object. If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.
If path is None, uses the path='.'.
set_blocking(fd, blocking, /)
Set the blocking mode of the specified file descriptor.
Set the O_NONBLOCK flag if blocking is False,
clear the O_NONBLOCK flag otherwise.
set_handle_inheritable(handle, inheritable, /)
Set the inheritable flag of the specified handle.
set_inheritable(fd, inheritable, /)
Set the inheritable flag of the specified file descriptor.
spawnl(mode, file, *args)
spawnl(mode, file, *args) -> integer
Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnle(mode, file, *args)
spawnle(mode, file, *args, env) -> integer
Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnv(mode, path, argv, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
spawnve(mode, path, argv, env, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
startfile(...)
Start a file with its associated application.
When "operation" is not specified or "open", this acts like
double-clicking the file in Explorer, or giving the file name as an
argument to the DOS "start" command: the file is opened with whatever
application (if any) its extension is associated.
When another "operation" is given, it specifies what should be done with
the file. A typical operation is "print".
"arguments" is passed to the application, but should be omitted if the
file is a document.
"cwd" is the working directory for the operation. If "filepath" is
relative, it will be resolved against this directory. This argument
should usually be an absolute path.
"show_cmd" can be used to override the recommended visibility option.
See the Windows ShellExecute documentation for values.
startfile returns as soon as the associated application is launched.
There is no option to wait for the application to close, and no way
to retrieve the application's exit status.
The filepath is relative to the current directory. If you want to use
an absolute path, make sure the first character is not a slash ("/");
the underlying Win32 ShellExecute function doesn't work if it is.
stat(path, *, dir_fd=None, follow_symlinks=True)
Perform a stat system call on the given path.
path
Path to be examined; can be string, bytes, a path-like object or
open-file-descriptor int.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
stat will examine the symbolic link itself instead of the file
the link points to.
dir_fd and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
strerror(code, /)
Translate an error code to a message string.
symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.
target_is_directory is required on Windows if the target is to be
interpreted as a directory. (On Windows, symlink requires
Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
system(command)
Execute the command in a subshell.
times()
Return a collection containing process timing information.
The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating-point numbers.
truncate(path, length)
Truncate a file, specified by path, to a specific length.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
umask(mask, /)
Set the current numeric umask and return the previous umask.
unlink(path, *, dir_fd=None)
Remove a file (same as remove()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
unsetenv(name, /)
Delete an environment variable.
urandom(size, /)
Return a bytes object containing random bytes suitable for cryptographic use.
utime(...)
Set the access and modified time of path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
If follow_symlinks is False, and the last element of the path is a symbolic
link, utime will modify the symbolic link itself instead of the file the
link points to.
It is an error to use dir_fd or follow_symlinks when specifying path
as an open file descriptor.
dir_fd and follow_symlinks may not be available on your platform.
If they are unavailable, using them will raise a NotImplementedError.
waitpid(pid, options, /)
Wait for completion of a given process.
Returns a tuple of information regarding the process:
(pid, status << 8)
The options argument is ignored on Windows.
waitstatus_to_exitcode(status)
Convert a wait status to an exit code.
On Unix:
* If WIFEXITED(status) is true, return WEXITSTATUS(status).
* If WIFSIGNALED(status) is true, return -WTERMSIG(status).
* Otherwise, raise a ValueError.
On Windows, return status shifted right by 8 bits.
On Unix, if the process is being traced or if waitpid() was called with
WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true.
This function must not be called if WIFSTOPPED(status) is true.
walk(top, topdown=True, onerror=None, followlinks=False)
Directory tree generator.
For each directory in the directory tree rooted at top (including top
itself, but excluding '.' and '..'), yields a 3-tuple
dirpath, dirnames, filenames
dirpath is a string, the path to the directory. dirnames is a list of
the names of the subdirectories in dirpath (including symlinks to directories,
and excluding '.' and '..').
filenames is a list of the names of the non-directory files in dirpath.
Note that the names in the lists are just names, with no path components.
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).
If optional arg 'topdown' is true or not specified, the triple for a
directory is generated before the triples for any of its subdirectories
(directories are generated top down). If topdown is false, the triple
for a directory is generated after the triples for all of its
subdirectories (directories are generated bottom up).
When topdown is true, the caller can modify the dirnames list in-place
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
topdown is false has no effect on the behavior of os.walk(), since the
directories in dirnames have already been generated by the time dirnames
itself is generated. No matter the value of topdown, the list of
subdirectories is retrieved before the tuples for the directory and its
subdirectories are generated.
By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
to abort the walk. Note that the filename is available as the
filename attribute of the exception object.
By default, os.walk does not follow symbolic links to subdirectories on
systems that support them. In order to get this functionality, set the
optional argument 'followlinks' to true.
Caution: if you pass a relative pathname for top, don't change the
current working directory between resumptions of walk. walk never
changes the current directory, and assumes that the client doesn't
either.
Example:
import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print(root, "consumes ")
print(sum(getsize(join(root, name)) for name in files), end=" ")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs:
dirs.remove('CVS') # don't visit CVS directories
write(fd, data, /)
Write a bytes object to a file descriptor.
DATA
EX_OK = 0
F_OK = 0
O_APPEND = 8
O_BINARY = 32768
O_CREAT = 256
O_EXCL = 1024
O_NOINHERIT = 128
O_RANDOM = 16
O_RDONLY = 0
O_RDWR = 2
O_SEQUENTIAL = 32
O_SHORT_LIVED = 4096
O_TEMPORARY = 64
O_TEXT = 16384
O_TRUNC = 512
O_WRONLY = 1
P_DETACH = 4
P_NOWAIT = 1
P_NOWAITO = 3
P_OVERLAY = 2
P_WAIT = 0
R_OK = 4
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
TMP_MAX = 2147483647
W_OK = 2
X_OK = 1
__all__ = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', ...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
environ = environ({'ALLUSERSPROFILE': 'C:\\ProgramData', '...undled\\l...
extsep = '.'
linesep = '\r\n'
name = 'nt'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_bytes_environ = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\os.py
azure-storage-blob.upload_blob_to_url
Python Library Documentation: function upload_blob_to_url in module azure.storage.blob
upload_blob_to_url(blob_url: str, data: Union[Iterable[~AnyStr], IO[~AnyStr]], credential: Union[str, Dict[str, str], ForwardRef('AzureNamedKeyCredential'), ForwardRef('AzureSasCredential'), ForwardRef('TokenCredential'), NoneType] = None, **kwargs: Any) -> Dict[str, Any]
Upload data to a given URL
The data will be uploaded as a block blob.
:param str blob_url:
The full URI to the blob. This can also include a SAS token.
:param data:
The data to upload. This can be bytes, text, an iterable or a file-like object.
:type data: bytes or str or Iterable
:param credential:
The credentials with which to authenticate. This is optional if the
blob URL already has a SAS token. The value can be a SAS token string,
an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
an account shared access key, or an instance of a TokenCredentials class from azure.identity.
If the resource URI already contains a SAS token, this will be ignored in favor of an explicit credential
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
should be the storage account key.
:type credential:
~azure.core.credentials.AzureNamedKeyCredential or
~azure.core.credentials.AzureSasCredential or
~azure.core.credentials.TokenCredential or
str or dict[str, str] or None
:keyword bool overwrite:
Whether the blob to be uploaded should overwrite the current data.
If True, upload_blob_to_url will overwrite any existing data. If set to False, the
operation will fail with a ResourceExistsError.
:keyword int max_concurrency:
The number of parallel connections with which to download.
:keyword int length:
Number of bytes to read from the stream. This is optional, but
should be supplied for optimal performance.
:keyword dict(str,str) metadata:
Name-value pairs associated with the blob as metadata.
:keyword bool validate_content:
If true, calculates an MD5 hash for each chunk of the blob. The storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob. Also note that if enabled, the memory-efficient upload algorithm
will not be used, because computing the MD5 hash requires buffering
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
:keyword str encoding:
Encoding to use if text is supplied as input. Defaults to UTF-8.
:return: Blob-updated property dict (Etag and last modified)
:rtype: dict(str, Any)