Skip to main content

Posts

Showing posts from 2018

IOT-Firebase-Python

Connecting raspberry with the firebase using the python. I will code here how to upload the images or some data to firesebase using python. Sample code to upload images and data to firebase is there in github : https://github.com/yuvaraj119/IOT-Firebase-Python  First install pyrebase from https://pypi.org/project/Pyrebase/ Now we are good to go with code. import pyrebase import uuid from uuid import getnode as get_mac import getpass import datetime import os config = { "apiKey":"", #get api key from firebase "authDomain":"", #firebase app auth url "databaseURL": "", #add yout db url from firebase where your data is gonna store "storageBucket": "" #storage bucket url from firebase storage } firebase = pyrebase.initialize_app(config) db = firebase.database() storage = firebase.storage() is_session=False #creating unique name for session and device uid_str = uuid.uuid5(uuid.NAM