Giter Site home page Giter Site logo

python-firebase's Introduction

⛔️ DEPRECATED

No Maintenance Intended

python-firebase has been unmaintained for years and is no longer supported. Please consider using another library instead.

python-firebase

http://github.com/mikexstudios/python-firebase by Michael Huynh ([email protected])

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.

python-firebase's People

Contributors

guanlisheng avatar mikexstudios avatar robv avatar wmdmark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

python-firebase's Issues

ImportError: No module named pwd

The following error occurs when running "from firebase import Firebase". Based on the stackoverflow responses, it seems to be due to the fact that "the newer version of the SDK doesn't allow you to import the pwd module in its sandbox mode."
http://stackoverflow.com/questions/18819604/importerror-no-module-named-pwd-but-it-exists

Is there a work around for this issue?

====See below for error message =====
ERROR 2015-09-05 07:40:52,328 wsgi.py:263]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = import(path[0])
File "/Users/puruzio/_dev/PycharmProjects/stickyreminder/main.py", line 31, in
from project import project_handler, mail_handlers
File "/Users/puruzio/_dev/PycharmProjects/stickyreminder/project/project_handler.py", line 31, in
from firebase import Firebase
File "/Users/puruzio/_dev/PycharmProjects/stickyreminder/external/firebase/init.py", line 1, in
import requests
File "/Users/puruzio/_dev/PycharmProjects/stickyreminder/external/requests/init.py", line 58, in
from . import utils
File "/Users/puruzio/_dev/PycharmProjects/stickyreminder/external/requests/utils.py", line 19, in
from netrc import netrc, NetrcParseError
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/netrc.py", line 7, in
import pwd
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py", line 950, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named pwd

Rename repository as not to conflict with existing python-firebase

I prefer this repository over the other python-firebase due to it's simplicity and not overcomplicating things with multiple processes and sorts.

However, it would be a lot better off it if renamed and available on the standard pip installer instead of git-only.

Maybe

python-firebased or somthing.

Can't connect to HTTPS URL because the SSL module is not available.

I am having following error appengine

Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1535, in call
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1529, in call
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1102, in call
return handler.dispatch()
File "E:\Bolt Reactor\basic app with header\wildpakistan\controllers\Handlers.py", line 26, in dispatch
webapp2.RequestHandler.dispatch(self)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "E:\Bolt Reactor\basic app with header\wildpakistan\controllers\main.py", line 120, in get
r = f.push({'user_id': 'wilma', 'text': 'Hello'})
File "E:\Bolt Reactor\basic app with header\wildpakistan\controllers\main.py", line 45, in push
return self.post(data)
File "E:\Bolt Reactor\basic app with header\wildpakistan\controllers\main.py", line 69, in post
return self.__request('post', data = data)
File "E:\Bolt Reactor\basic app with header\wildpakistan\controllers\main.py", line 90, in __request
r = requests.request(method, self.__url(), params=params, **kwargs)
File "E:\Bolt Reactor\basic app with header\wildpakistan\lib\requests\api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "E:\Bolt Reactor\basic app with header\wildpakistan\lib\requests\sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "E:\Bolt Reactor\basic app with header\wildpakistan\lib\requests\sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "E:\Bolt Reactor\basic app with header\wildpakistan\lib\requests\adapters.py", line 497, in send
raise SSLError(e, request=request)
SSLError: Can't connect to HTTPS URL because the SSL module is not available.

child/parent calls fail on auth

child and parent method calls create a new Firebase object without auth token, so subsequent api calls will fail if resource is protected.

Pip install -t raises error

Hi.

I'm trying to install python-firebase with pip and got an error.

pip install -e git://github.com/mikexstudios/python-firebase.git#egg=python-firebase -t lib
I'm getting this error:

Command /usr/bin/python -c "import setuptools, tokenize; file='/home/julian/Developer/work/teachme/src/python-firebase/setup.py'; exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" develop --no-deps --home=/tmp/tmpbKbMOz failed with error code 1 in /home/julian/Developer/work/teachme/src/python-firebase

Some idea of what is happening?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.