Skip to content

Basic usage documentation

BlobStorageExtendedAsync

BlobStorageExtendedAsync(connection_string, local_base_path='azure_tmp/')

Bases: BlobStorageBaseAsync

local_base_path: local folder where data will be downloaded if path is not specified

get_file_as_pandas_df async

get_file_as_pandas_df(container_name, remote_file_name, **kwargs)

Get a blob & load it as a pandas DataFrame

Parameters:

Name Type Description Default
container_name str

Name of the container

required
remote_file_name str

Name of the blob

required
**kwargs Optional[Dict]

add any kwarg that you would put in pd.read_* methods.

{}

get_image_as_numpy_array async

get_image_as_numpy_array(container_name, remote_file_name)

Get an image file from blob & load it as numpy array

Parameters:

Name Type Description Default
container_name str

Name of the container

required
remote_file_name str

Name of the blob

required

upload_image_bytes_as_jpg_file async

upload_image_bytes_as_jpg_file(img, container_name, remote_file_name, overwrite=False)

Upload an in memory image numpy array as a jpg file

Parameters:

Name Type Description Default
img np.ndarray

a RGB numpy array

required
container_name str

Name of the container

required
remote_file_name str

Name of the blob where image will be uploaded

required
overwrite Optional[bool]

set to True if needed

False

upload_pandas_df async

upload_pandas_df(df, container_name, remote_file_name, overwrite=False, **kwargs)

Upload a in memory pandas DataFrame to a blob

Parameters:

Name Type Description Default
df pd.DataFrame

a pandas DataFrame

required
container_name str

Name of the container

required
remote_file_name str

Name of the blob where the dataframe will be uploaded

required
overwrite Optional[bool]

set to True if needed

False
**kwargs Optional[Dict]

add any kwarg that you would put in pd.to_* methods.

{}