pypicloud.storage.azure_blob module

Store packages in Azure Blob Storage

class pypicloud.storage.azure_blob.AzureBlobStorage(request, expire_after=None, path_prefix=None, redirect_urls=None, storage_account_name=None, storage_account_key=None, storage_account_url=None, storage_container_name=None)[source]

Bases: IStorage

Storage backend that uses Azure Blob Storage

check_health()[source]

Check the health of the storage backend

Returns
(healthy, status)(bool, str)

Tuple that describes the health status and provides an optional status message

classmethod configure(settings)[source]

Configure the storage method with app settings

delete(package)[source]

Delete a package file

Parameters
packagePackage

The package metadata

download_response(package)[source]

Return a HTTP Response that will download this package

This is called from the download endpoint

get_path(package)[source]

Get the fully-qualified bucket path for a package

get_uri(package)[source]
list(factory=<class 'pypicloud.models.Package'>)[source]

Return a list or generator of all packages

open(package)[source]

Overwrite open method to re-use client instead of using signed url.

test = False[source]
upload(package, datastream)[source]

Upload a package file to the storage backend

Parameters
packagePackage

The package metadata

datastreamfile

A file-like object that contains the package data