firebase_admin.storage module

Firebase Cloud Storage module.

This module contains utilities for accessing Google Cloud Storage buckets associated withFirebase apps. This requires thegoogle-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 wheninitializing the App. If that is also not available raises an error. This functiondoes 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 theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-09-26 UTC.