storage.blob ============ .. py:module:: storage.blob Attributes ---------- .. autoapisummary:: storage.blob.HOST Classes ------- .. autoapisummary:: storage.blob._SignatureMethod storage.blob.Blob Module Contents --------------- .. py:data:: HOST .. py:class:: _SignatureMethod Bases: :py:obj:`enum.Enum` Indicates where the url signing will be done through Google's IAM API or through local signing with a PEM file, which is faster but requires that the provided token contains client_email and private_key data .. py:attribute:: PEM :value: 0 .. py:attribute:: IAM_API :value: 1 .. py:class:: Blob(bucket, name, metadata) .. py:attribute:: bucket .. py:attribute:: name .. py:attribute:: size :type: int .. py:property:: chunk_size :type: int .. py:method:: download(timeout = DEFAULT_TIMEOUT, session = None, auto_decompress = True) :async: .. py:method:: upload(data, content_type = None, session = None) :async: .. py:method:: get_signed_url(expiration, headers = None, query_params = None, http_method = 'GET', iam_client = None, service_account_email = None, token = None, session = None) :async: Create a temporary access URL for Storage Blob accessible by anyone with the link. Adapted from Google Documentation: https://cloud.google.com/storage/docs/access-control/signing-urls-manually#python-sample .. py:method:: get_pem_signature(str_to_sign, private_key) :staticmethod: .. py:method:: get_iam_api_signature(str_to_sign, iam_client, service_account_email, session) :staticmethod: :async: