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.
Release files for micropython-firebase-realtime 0.0.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| micropython-firebase-realtime-0.0.1.post1.tar.gz | 2.3 kB | Details |
Release files / micropython-firebase-realtime-0.0.1.post1.tar.gz
| Download URL | micropython-firebase-realtime-0.0.1.post1.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1046572536890400ce5834e7397ff213274445968bb9c47605a52678c37e8c21
|
|
BLAKE2b-256 checksum How to use checksums |
17148059fdfcb309b3443fffa815128c5b10fac1b3f2ec765979820a0855d0ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|