firebase_admin.storage module

Firebase Cloud Storage module.

This module contains utilities for accessing Google Cloud Storage buckets associated with Firebase apps. This requires the google-cloud-storage Python module.

Functions

bucket

firebase_admin.storage.bucket(name=None, app=None) Bucket

Returns a handle to a Google Cloud Storage bucket.

If the name argument is not provided, uses the ‘storageBucket’ option specified when initializing the App. If that is also not available raises an error. This function does not make any RPC calls.

Parameters:
  • name – Name of a cloud storage bucket (optional).

  • app – An App instance (optional).

Returns:

A handle to the specified bucket.

Return type:

google.cloud.storage.Bucket

Raises:

ValueError – If a bucket name is not specified either via options or method arguments, or if the specified bucket name is not a valid string.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-09-26 UTC.