-
Notifications
You must be signed in to change notification settings - Fork 321
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
FR: Realtime Database API #28
Comments
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information. |
You might be interested to know, that a database API around the existing REST support is currently bring developed at https://github.com/firebase/firebase-admin-python/tree/hkj-simple-db |
@hiranya911, I'm having trouble using your merged (#31) Database API, do you have any examples of using db.py? Here's what I'm trying to do with your work: import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
cred = credentials.Certificate('service-account-credentials.json')
app = firebase_admin.initialize_app(cred)
dbRef = db.Reference(path='/', app=app)
users = dbRef.child('users')
print(users)
print(users.get_value()) and I get
|
PS @galuszkak to access db.py you'll need to use |
Try something like:
However, note that we are still working on this and the API is subject to change. |
Thank you, I'll try this after lunch!
Once it gets closer, I can help provide examples or flesh out documentation
if you'd like. The Python SDK is central to a current work project so I'd
love to give back.
EDIT: that works wonderfully, thanks :)
…On Jun 20, 2017 12:14 PM, "Hiranya Jayathilaka" ***@***.***> wrote:
Try something like:
app = firebase_admin.initialize_app(cred, {'dbURL' : 'https://your-db-url.firebase.com'})
ref = db.get_reference()
However, note that we are still working on this and the API is subject to
change.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUA5LxCN2rmZvzPgGniuDf3oZSa9mFGBks5sF_3zgaJpZM4NlY4L>
.
|
Also, and sorry if I'm being a bother, but it doesn't appear that there is an implementation in this python SDK for subscribing to and handling events (like .on('child_added') in the node SDK, for example.) Could I be of any help in extending this for that? |
@joshbabb We are not going to implement realtime event handling capabilities in this iteration. We will consider it for a future release, if there's enough demand for it. But feel free to document your requirements/suggestions as issues in this repo. That will help us to prioritize the features. We will also gladly accept any code contributions you can provide us. But if you're going to implement realtime support I'd recommend you to wait until we release what we have already implemented (should be any day now -- we are just finalizing the internal approval processes). |
Also please note that I've just merged #35 into master. You should update your test code as follows:
|
Thanks for the note and all your responses, @hiranya911 I'll make an issue for the request at a later time. We're going to hack what we can together for the time being :) |
This is just to say that I much appreciate the great and easy to understand stuff you're doing. Keep on going! |
Thanks @fugu2 :) |
FR: Realtime Database API
Describe the problem
Lack of support for Realtime Database API now in firebase-admin.
The text was updated successfully, but these errors were encountered: