Reputation: 1282
I am using pyrebase to push data into my firebase database. there is no issues when I push data normally. But issues arises with special symbols in child name. For example
db.child("users").child("+91xxxxx")push(value, user['idToken'])
will set the child key as "91xxxx"
the +
symbol is getting omitted.
Is there any way to fix this
NB This is not an issue with firebase. It maybe the pyrebase or the request which omits the data. I have successfully pushed the same values from android app. I am even not able to fetch datas pushed from android because the child has a key that starts with '+'
Upvotes: 0
Views: 413
Reputation: 1282
Finally I got an answer after reporting to github https://github.com/thisbejim/Pyrebase/issues/187#issuecomment-315940379
for python 2 it is
urllib.pathname2url('+91')
and for python 3 it is
urllib.parse.quote_plus("+91")
thanks for everyone
Upvotes: 1