Skip to main content

Async Firebase REST API

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

This package is an async fork of AsifArmanRahman/firebase-rest-api.


Installation

pip install async-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 Async 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
await auth.create_user_with_email_and_password(email, password)
user = await 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": await user.get('email')
}

# Store data to Firebase Database
await 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
await storage.child(user.get('localId')).child('uploaded-picture.png').put(file_path, user.get('idToken'))

Release files for async-firebase-rest-api 2.2.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 async-firebase-rest-api 2.2.0
File Size Uploaded
async_firebase_rest_api-2.2.0.tar.gz 50.4 kB Details

Built distribution (wheel)

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

Total release size: 77.7 kB

Release files / async_firebase_rest_api-2.2.0.tar.gz

Download URL async_firebase_rest_api-2.2.0.tar.gz
Size 50.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1aa2e6e6aa4d25ce97201cae44408c732f32cfc35bce9ddd77057521f6309dcb
BLAKE2b-256 checksum
How to use checksums
dda8392b95c56242ed1c257086d921f54dbaa8b2fedef18a44befa1974970c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / async_firebase_rest_api-2.2.0-py3-none-any.whl

Download URL async_firebase_rest_api-2.2.0-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57d0196d15a1a064100136aa2a544b171e04bbd95c619d8a301ecbec7fb3b60d
BLAKE2b-256 checksum
How to use checksums
fb42fa78700ba0490ee85a8ba1c373ad6163ca33bfe49722c626dd97fd990bdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

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