Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-firebase-rest-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-firebase-rest-api

An async python wrapper for Google's Firebase REST API's.

  • 2.2.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

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.


GitHub Workflow Status
  <img alt="Read the Docs" src="https://img.shields.io/readthedocs/async-firebase-rest-api?logo=Read%20the%20Docs&logoColor=white">
CodeCov

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'))

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc