using Firebase for MDDatatable

48 views
Skip to first unread message

Kweku forreeal

unread,
Jul 10, 2023, 4:41:55 PM7/10/23
to Kivy users support
Hello everyone,I'm Emmanuel and I needed help with a project I am working on.It deals with using  python to get data from a firebase real-time databse to display on the kivyapp . Can anyone help me with that

Francisco Ponce

unread,
Jul 10, 2023, 4:54:35 PM7/10/23
to kivy-...@googlegroups.com
Hi

The steps would be:

1. Create the Main App
2. Connect to firebase using a token 
3. Create a MDData table
4. Change data using methods and callbacks from buttons...

This is an example using SQL DB, but you could do the same using firebase

rom kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout

#from firebase import firebase

import MySQLdb






class FirstScreen(BoxLayout):
def database(self):
import MySQLdb
db = MySQLdb.connect("your data here")
insertrec = db.cursor()
sqlquery = "INSERT INTO `Userpassword` (`mail`, `password`) VALUES ('valeu', 'valeu')"
insertrec.execute(sqlquery)
db.commit()
db.close


# Designate Our .kv design file
kv = Builder.load_string("""


<FirstScreen>:
name: "first"
BoxLayout:
padding:'2.04cm'
spacing:'0.838cm'
orientation: "vertical"
size: root.width, root.height
BoxLayout:
orientation:'vertical'
size_hint_y: None
height:'4.169cm'
Image:
source:"domy.png"
size_hint_y: None
height:"2.465cm"

Label:
text:'Sign In'
font_size: '1.05833cm'
""")
Let me know if it helps...



El lun, 10 jul 2023 a la(s) 17:42, Kweku forreeal (realkw...@gmail.com) escribió:
Hello everyone,I'm Emmanuel and I needed help with a project I am working on.It deals with using  python to get data from a firebase real-time databse to display on the kivyapp . Can anyone help me with that

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/209a0665-eb70-4c3b-b10a-15899649a5c7n%40googlegroups.com.


--
Francisco Ponce

Robert

unread,
Jul 10, 2023, 5:29:18 PM7/10/23
to Kivy users support
Reply all
Reply to author
Forward
0 new messages