Skip to main content

Firebase realtime implementation for Micropython

Project description

micropython-firebase-realtime

Getting started

Firebase auth & realtime database implementation based on REST API,

Installation

You can use uPip to install library from PyPi

import upip
upip.install("micropython-firebase-realtime")

or you can just upload firebase_realtime.py to your microcontroller's lib folder, using Tonny IDE.

Commands implemented

Auth

  • add_user
  • validate_user

Realtime Database

  • put
  • patch
  • post
  • get
  • delete

Examples

from firebase_realtime import Auth, Realtime

# Please provide appropriate project_id
# PROJECT_ID = <project_id>
real_db_url = f"https://{PROJECT_ID}.firebaseio.com/"
auth = Auth()
flg, headers = auth.validate_user(email, password, API_KEY)
print(flg, headers)
realtime = Realtime(real_db_url, headers)
print(realtime)
flg, data = realtime.put("test123", data={"test1": 123})
print(flg, data)
flg, data = realtime.patch("test123", data_tag={"test2": 1232})
print(flg, data)
flg, data = realtime.patch("test123", data_tag={"test3": 1233})
print(flg, data)
flg, data = realtime.get("test123")
print(flg, data)
flg, data = realtime.delete("test123")
print(flg, data)

License

For open source projects, say how it is licensed with GNU 3.0 or later

Project status

Will keep it update as and when needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

File details

Details for the file micropython-firebase-realtime-0.0.1.post1.tar.gz.

File metadata

File hashes

Hashes for micropython-firebase-realtime-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 1046572536890400ce5834e7397ff213274445968bb9c47605a52678c37e8c21
MD5 4cdd73f0140c0c152960ec67a5986116
BLAKE2b-256 17148059fdfcb309b3443fffa815128c5b10fac1b3f2ec765979820a0855d0ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page