Python firebase

Source: Internet
Author: User

Label:

Download requires a direct download from GitHub and there are bugs in the packages downloaded elsewhere

I'm using the Ubuntu system.

Installation: Pip install git+http://github.com/ozgur/python-firebase.git/#master

Document reference Address: http://ozgur.github.io/python-firebase/

Suppose there are engineering Mypro in Firebase, library mydb

From Firebase Import Firebase

Firebase=firebase. Firebaseapplication ("https://myPro.firebaseio.com", None)

So you connect to Firebase.

Create a new node with post, modify with patch, remove delete

Result=firebase.post (' Test/1 ', {' name ': ' Jack ', ' age ': ' 100 '})

That is, under the MyDB New test node, under the test node has a "1" node, and then on the firebase to see an automatically added string, click the plus sign to expand,

Here's the dictionary we pushed up before.

Name:jack

age:100

Where the value can be modified directly on the Firebase

You can also create directly with patches

Result=firebase.patch (' Test/2 ', {' Gender ': ' Woman ', ' hobby ': ' Guitar '})

On the firebase, you'll find a string that's not automatically added this time.

and can be directly modified

Result=firebase.patch (' Test/2 ', {' Gender ': ' Man ', ' hobby ': ' Internet serfing '})

Python firebase

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: