我正在尝试使用python从firebase获取数据,但我遇到了很多错误。这是我的代码 -
#random student ages
[32 37 53 48 39 44 33 40 56 47]
#random student marks
[167 160 176 163 209 178 201 164 190 156]
#sorted marked according to ages
[32 33 37 39 40 44 47 48 53 56]
[167 201 160 209 164 178 156 163 176 190]
其中一个错误是:
文件" C:\ Python36 \ lib \ site-packages \ firebase \ firebase.py",第38行,在make_get_request响应= connection.get(url,params = params,headers = headers,timeout =超时)
答案 0 :(得分:0)
$ sudo pip install firebase-admin
import firebase_admin from firebase_admin import credentials
cred = credentials.Certificate('path/to/serviceAccountKey.json') default_app = firebase_admin.initialize_app(cred)