Skip to content
This repository was archived by the owner on Aug 26, 2019. It is now read-only.

Commit e405511

Browse files
committed
Initial commit
0 parents  commit e405511

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
*.swp
3+
*.pyc
4+
env/
5+
pip-log.txt

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
python-firebase
2+
===============
3+
http://github.com/mikexstudios/python-firebase
4+
by Michael Huynh (mike@mikexstudios.com)
5+
6+
Purpose:
7+
-------
8+
9+
A very simple wrapper for Firebase's REST API.
10+
11+
How to use
12+
----------
13+
14+
1. Install python-firebase using pip:
15+
16+
pip install -e git://github.com/mikexstudios/python-firebase.git#egg=python-firebase
17+
18+
or with easy_install (not recommended):
19+
20+
easy_install http://github.com/mikexstudios/python-firebase/tarball/master
21+
22+
Note that python-firebase depends on requests (http://python-requests.org),
23+
a REST/http client for python. If you used pip or easy_install, the
24+
dependency should automatically be installed.
25+
26+
2. Then simply import firebase at the top of your python script:
27+
28+
from firebase import Firebase
29+
30+
and then instantiate Firebase, passing in your root url:
31+
32+
f = Firebase('http://demo.firebase.com/SampleChat')
33+
34+
Now call the different methods of the Firebase class (see the Firebase
35+
REST API page: http://www.firebase.com/docs/rest-api.html and the source of
36+
`firebase/__init__.py` for what methods are available and how to call
37+
them). For example, to push a list of data:
38+
39+
r = f.push('message_list', {'user_id': 'wilma', 'text': 'Hello'})
40+
41+
The response `r` is a dictionary containing Firebase's REST response:
42+
43+
{"name":"-INOQPH-aV_psbk3ZXEX"}
44+
45+
46+
License
47+
-------
48+
49+
django-firebase is BSD licensed.
50+

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name = 'python-firebase',
5+
packages = find_packages(),
6+
version = '0.1.0',
7+
description = "Simple wrapper around Firebase's REST API",
8+
author = 'Michael Huynh',
9+
author_email = 'mike@mikexstudios.com',
10+
url = 'http://github.com/mikexstudios/python-firebase',
11+
install_requires = ['requests'],
12+
classifiers = [
13+
'Programming Language :: Python',
14+
'License :: OSI Approved :: BSD License',
15+
]
16+
)
17+

0 commit comments

Comments
 (0)