Firebase Admin Python SDK Release Notes

To see release notes for the Firebase console and for other Firebase platforms and related SDKs, see the Firebase Release Notes.

Version 2.10.0 - April 12, 2018

Authentication

  • feature A new create_session_cookie() method for creating a session cookie from a Firebase ID token.
  • feature A new verify_session_cookie() method for validating a given session cookie string.
  • fixed The auth module now caches the public key certificates used to verify ID tokens and session cookies, thus avoiding a network call everytime a credential needs to be verified.

Cloud Messaging

  • feature Added the mutable_content optional field to the messaging.Aps type. This can be used to set the mutable-content property when sending FCM messages to APNs targets.
  • feature Added support for specifying arbitrary key-value fields in the messaging.Aps type.

Version 2.9.1 - March 15, 2018

Cloud Messaging

  • fixed Improved error handling in the messaging.send() API. Exceptions raised by this API now contain the correct error codes as defined in the documentation.
  • fixed The messaging module now supports specifying an HTTP timeout for all egress requests. Pass the httpTimeout option to firebase_admin.initialize_app() before invoking any functions in messaging. Thanks carsongee for the contribution.

Version 2.9.0 - February 14, 2018

Cloud Messaging

  • feature A new firebase_admin.messaging module for sending FCM messages and managing topic subscriptions.
  • feature A new send() function for sending FCM messages.
  • feature A new subscribe_to_topic() function for subscribing a list of device registration tokens to a FCM topic.
  • feature A new unsubscribe_from_topic() function for unsubscribing a list of device registration tokens from a FCM topic.

Authentication

  • feature The verify_id_token() function now accepts an optional check_revoked parameter. When True, an additional check is performed to see whether the token has been revoked.
  • feature A new revoke_refresh_tokens() function to invalidate all tokens issued to a user.
  • feature A new tokens_valid_after_timestamp property has been added to the UserRecord class to indicate the time before which tokens are not valid.

Version 2.8.0 - January 11, 2018

Initialization

  • feature The initialize_app() method can now be invoked without any arguments. This initializes an app using Google Application Default Credentials, and other options loaded from the FIREBASE_CONFIG environment variable.

Realtime Database

  • feature The db.Reference.get() method now accepts an optional shallow argument. If set to True this causes the SDK to execute a shallow read, which does not retrieve the child node values of the current reference.

Version 2.7.0 - December 21, 2017

  • feature A new instance_id API that facilitates deleting instance IDs and associated user data from Firebase projects.

Version 2.6.0 - December 08, 2017

Authentication

  • feature Added the list_users() function to the firebase_admin.auth module. This function enables listing or iterating over all user accounts in a Firebase project.
  • feature Added the set_custom_user_claims() function to the firebase_admin.auth module. This function enables setting custom claims on a Firebase user. The custom claims can be accessed via that user's ID token.

Realtime Database

  • fixed Updated the start_at(), end_at() and equal_to() methods of the db.Query class so they can accept empty string arguments.

Version 2.5.0 - November 07, 2017

Version 2.4.0 - September 21, 2017

Realtime Database

  • feature The db.Reference class now has a get_if_changed() method, which retrieves a database value only if the value has changed since last read.
  • feature The options dictionary passed to initialize_app() function can now contain an httpTimeout option, which sets the timeout (in seconds) for outbound HTTP connections started by the SDK.

Version 2.3.0 - August 30, 2017

Realtime Database

  • feature You can now get the ETag value of a database reference by passing etag=True to the get() method of a db.Reference object.
  • feature The db.Reference class now has a set_if_unchanged() method, which you can use to write to a database location only when the location has the ETag value you specify.
  • fixed Fixed an issue with the transaction() method that prevented you from updating scalar values in a transaction.

Version 2.2.0 - August 14, 2017

Authentication

  • feature A new user management API that allows provisioning and managing Firebase users from Python applications. This API adds get_user(), get_user_by_email(), get_user_by_phone_number(), create_user(), update_user() and delete_dser() methods to the firebase_admin.auth module.

Realtime Database

  • feature The db.Reference class now exposes a transaction() method, which can be used to execute atomic updates on database references.

Version 2.1.1 - July 25, 2017

  • fixed Constructors of Certificate and RefreshToken credential types can now be invoked with either a file path or a parsed JSON object. This facilitates the consumption of service account credentials and refresh token credentials from sources other than the local file system.
  • fixed Better integration with the google-auth library for making authenticated HTTP requests from the SDK.

Version 2.1.0 - June 28, 2017

Version 2.0.0 - May 17, 2017

  • changed This SDK has been migrated from oauth2client to the new google-auth library.

Authentication

  • fixed This SDK now supports verifying ID tokens when initialized with application default credentials.

Version 1.0.0 - April 04, 2017

Initialization

  • feature Implemented the firebase_admin module, which provides the initialize_app() function for initializing the SDK with a credential.
  • feature Implemented the firebase_admin.credentials module, which contains constructors for Certificate, ApplicationDefault and RefreshToken credential types.

Authentication

  • feature Implemented the firebase_admin.auth module, which provides create_custom_token() and verify_id_token() functions for minting custom authentication tokens and verifying Firebase ID tokens.

Send feedback about...

Need help? Visit our support page.