You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
558 B

7 years ago
7 years ago
  1. import pyrebase
  2. config = {
  3. "apiKey": "AIzaSyD3bXRjLxEAVOKtj8hpjO4iI3Nn32F7agU",
  4. "authDomain": "foodcloud-f6eb1.firebaseapp.com",
  5. "databaseURL": "https://foodcloud-f6eb1.firebaseio.com/",
  6. "storageBucket": "foodcloud-f6eb1.appspot.com"
  7. }
  8. firebase = pyrebase.initialize_app(config)
  9. auth = firebase.auth()
  10. user = auth.sign_in_with_email_and_password('yigitcolakohlu@gmail.com', 'FoodWro2018')
  11. db = firebase.database()
  12. database_content = db.child("Products").get().val()
  13. def getDate(product):
  14. return str((database_content[int(product)]['BBD']))