Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing data with period #58

Open
wontonst opened this issue Feb 28, 2016 · 4 comments
Open

Storing data with period #58

wontonst opened this issue Feb 28, 2016 · 4 comments

Comments

@wontonst
Copy link

How would I ever go about storing any data with a period?

firebase.put('/',".", {'print':'silent'})
firebase.put('/',"""{"test":"."}""", {'print': 'silent'})
firebase.put('/test',".", {'print': 'silent'})

All of these will result in a 400 Client Error.

@wontonst
Copy link
Author

Ok so I figured out that we can do

firebase.put('/',"blah", {'test':'.'},)

But I cannot store in the root using

firebase.put('/',"", {'test':'.'},)

@wontonst
Copy link
Author

After more digging around, it turns out erroring out is correct, but it would be great to have a nicer error message. I also edited the README in pull #59 to make post/put look more intuitive since I didn't read the entire readme and got confused/wasted a lot of time.

@egreenmachine
Copy link

%2E is valid, however using this as a key appears to cause a 400 error to be thrown. I am still trying to track it down, but it looks like it might be an issue with the underlying library (requests). Maybe someone with more python experience could offer some insight?

firebase.put('/test',"foo%2Ebar", {'print': 'silent'})

@darrelfrancis
Copy link
Contributor

darrelfrancis commented Jul 29, 2021

Firebase does not allow keys to contain a "."

The list of forbidden characters for keys is:

. (period)
$ (dollar sign)
[ (left square bracket)
] (right square bracket)
# (hash or pound sign)
/ (forward slash)
(space)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants