AzureBlobPipelineIo¶
-
class
toasty.pipeline.
AzureBlobPipelineIo
(connection_string, container_name, path_prefix)[source]¶ Bases:
toasty.pipeline.PipelineIo
I/O for pipeline processing that uses Microsoft Azure Blob Storage.
- Parameters
- connection_stringstr
The Azure “connection string” to use
- container_namestr
The name of the blob container within the storage account
- path_prefixstr or iterable of str
A list folder names within the blob container that will be prepended to all paths accessed through this object.
Methods Summary
check_exists
(*path)Test whether an item at the specified path exists.
get_item
(*path[, dest])Fetch a file-like item at the specified path, writing its contents into the specified file-like object dest.
list_items
(*path)List the items contained in the folder at the specified path.
put_item
(*path[, source])Put a file-like item at the specified path, reading its contents from the specified file-like object source.
Methods Documentation
-
check_exists
(*path)[source]¶ Test whether an item at the specified path exists.
- Parameters
- *pathstrings
The path to the item, intepreted as components in a folder hierarchy.
- Returns
- A boolean indicating whether the item in question exists.
-
get_item
(*path, dest=None)[source]¶ Fetch a file-like item at the specified path, writing its contents into the specified file-like object dest.
- Parameters
- *pathstrings
The path to the item, intepreted as components in a folder hierarchy.
- destwriteable file-like object
The object into which the item’s data will be written as bytes.
- Returns
- None.
-
list_items
(*path)[source]¶ List the items contained in the folder at the specified path.
- Parameters
- *pathstrings
The path to the item, intepreted as components in a folder hierarchy.
- Returns
- An iterable of
(stem, is_folder)
, where stem is the “basename” of an - item contained within the specified folder and is_folder is a boolean
- indicating whether this item appears to be a folder itself.
- An iterable of
-
put_item
(*path, source=None)[source]¶ Put a file-like item at the specified path, reading its contents from the specified file-like object source.
- Parameters
- *pathstrings
The path to the item, intepreted as components in a folder hierarchy.
- sourcereadable file-like object
The object from which the item’s data will be read, as bytes.
- Returns
- None.