Skip to main content

Firebase REST API

A simple python wrapper for Google's Firebase REST API's.


Installation

pip install firebase-rest-api

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Firebase project from Firebase Console.

  2. Register an Web App.

Example Usage

# Import Firebase REST API library
import firebase

# Firebase configuration
config = {
   "apiKey": "apiKey",
   "authDomain": "projectId.firebaseapp.com",
   "databaseURL": "https://databaseName.firebaseio.com",
   "projectId": "projectId",
   "storageBucket": "projectId.appspot.com",
   "messagingSenderId": "messagingSenderId",
   "appId": "appId"
}

# Instantiates a Firebase app
app = firebase.initialize_app(config)


# Firebase Authentication
auth = app.auth()

# Create new user and sign in
auth.create_user_with_email_and_password(email, password)
user = auth.sign_in_with_email_and_password(email, password)


# Firebase Realtime Database
db = app.database()

# Data to save in database
data = {
   "name": "Robert Downey Jr.",
   "email": user.get('email')
}

# Store data to Firebase Database
db.child("users").push(data, user.get('idToken'))


# Firebase Storage
storage = app.storage()

# File to store in storage
file_path = 'static/img/example.png'

# Store file to Firebase Storage
storage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))

Metadata

Release files for firebase-rest-api 1.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for firebase-rest-api 1.11.0
File Size Uploaded
firebase_rest_api-1.11.0.tar.gz 50.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for firebase-rest-api 1.11.0
File Interpreter ABI Platform
firebase_rest_api-1.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 79.5 kB

Release files / firebase_rest_api-1.11.0.tar.gz

Download URL firebase_rest_api-1.11.0.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
00accdd9030065ff02b50d1710a3d11e16cbc601730e980aac4ef481206d0a92
BLAKE2b-256 checksum
How to use checksums
abd0dc4dab4c1b2690593e09dfd7b5672a9278611d7879b9abbcca132a732718
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / firebase_rest_api-1.11.0-py3-none-any.whl

Download URL firebase_rest_api-1.11.0-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a3dba2356b591dea686a78d972f649add1cc9512a0d18011b1d4657c9750ecc
BLAKE2b-256 checksum
How to use checksums
778be33c24538882924c21fd4e6e64a9ccb2563db7f52a2332d22e6af0a8acdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

1.11.0 This release

2 release files

1.10.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page