我使用Python向Firebase添加了一些数据,我想使用我生成的MD5字符串作为每条记录的唯一索引。
Firebase中自动生成的密钥类似于“-KgMvzKKxVgj4RKN-3x5”。是否可以用Python替换它的价值?我知道如何用Javascript做到这一点。请帮忙......提前致谢!
f = firebase.FirebaseApplication('https://xxxxx.firebaseio.com')
f.post('meeting/',
{
"MD5index":MD5String,
"title": title,
"date": date,
"time": time,
"location": location
})
答案 0 :(得分:1)
put
代替post
:
f = firebase.FirebaseApplication('https://xxxxx.firebaseio.com')
f.put('meeting/mymeetingkey',
{
"MD5index":MD5String,
"title": title,
"date": date,
"time": time,
"location": location
})