Skip to content

advance512/python-firebase

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 4 commits ahead, 2 commits behind assisantunes:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

python-firebase

http://github.com/mikexstudios/python-firebase by Michael Huynh (mike@mikexstudios.com)

Purpose:

A very simple wrapper for Firebase's REST API.

How to use

  1. Install python-firebase using pip:

    pip install -e git://github.com/mikexstudios/python-firebase.git#egg=python-firebase
    

    or with easy_install (not recommended):

    easy_install http://github.com/mikexstudios/python-firebase/tarball/master
    

    Note that python-firebase depends on requests (http://python-requests.org), a REST/http client for python. If you used pip or easy_install, the dependency should automatically be installed.

  2. Then simply import firebase at the top of your python script:

    from firebase import Firebase
    

    and then instantiate Firebase, passing in your root url:

    f = Firebase('https://SampleChat.firebaseIO-demo.com/')
    

    You may optionaly pass a Firebase authentication token to secure your calls:

    f = Firebase('http://SampleChat.firebaseIO-demo.com/', auth_token="<my_firebase_auth_token>")
    

    Now call the different methods of the Firebase class (see the Firebase REST API page: http://www.firebase.com/docs/rest-api.html and the source of firebase/__init__.py for what methods are available and how to call them). For example, to push a list of data:

    f = Firebase('https://SampleChat.firebaseIO-demo.com/message_list')
    r = f.push({'user_id': 'wilma', 'text': 'Hello'})
    

    The response r is a dictionary containing Firebase's REST response:

    {"name":"-INOQPH-aV_psbk3ZXEX"}
    

License

django-firebase is BSD licensed.

About

python wrapper for Firebase's REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%