René's URL Explorer Experiment


Title: Adding stream listeners to sniff change in child by rizasif · Pull Request #50 · firebase/firebase-admin-python · GitHub

Open Graph Title: Adding stream listeners to sniff change in child by rizasif · Pull Request #50 · firebase/firebase-admin-python

X Title: Adding stream listeners to sniff change in child by rizasif · Pull Request #50 · firebase/firebase-admin-python

Description: Hello, I noticed that there (according to my best knowledge) hasn't been a stream listener implemented in the project. Which has a sole responsibility to fire up a callback function (https://firebase.google.com/docs/reference/rest/database/#callback) when any change to a firebase node is occurred. This is essential for developers who want to perform an action when a change to database is observed. The changes I proposed are inspired by PyRebase (https://github.com/thisbejim/Pyrebase). I have implemented a SSEClient which uses python request library to listen for changes. These changes have been tested using a simulation of 100 users, performing read and write operations. The results, so far, are promising with 0% failure rate. I have written a test code for you as well. The following adds a new child node to the already available parent "users". Now, if you visit the firebase console and delete this new child node, then the "call_function" will fire up. Similar, case can be observed by updating, adding or deleting in the child of "users" node through the console. import firebase_admin from firebase_admin import credentials from firebase_admin import db # Fetch the service account key JSON file contents cred = credentials.Certificate("PATH_TO_JSON_FILE") # Initialize the app with a service account, granting admin privileges firebase_admin.initialize_app(cred, {"databaseURL": "DATABASE_URL"}) root = db.reference() print(root.get()) new_user = root.child("users").push({"name": "lila Annen", "age": 19}) ref = root.child("users") print(ref.get()) def call_function(message): print( message["event"]) print(message["path"]) my_stream_question_requested = db.reference("users").stream(call_function, stream_id="new stream") Hope to hear from you soon, thanks!

Open Graph Description: Hello, I noticed that there (according to my best knowledge) hasn't been a stream listener implemented in the project. Which has a sole responsibility to fire up a callback function (https://fi...

X Description: Hello, I noticed that there (according to my best knowledge) hasn't been a stream listener implemented in the project. Which has a sole responsibility to fire up a callback function (https:...

Opengraph URL: https://github.com/firebase/firebase-admin-python/pull/50

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f893caea-2cb1-b490-fa64-0ba3973881af
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idECAC:1F3B04:34A226:429448:69912871
html-safe-nonce300a885619cc80550944f093324074b18cb19307bd103e4ccd462d0983019465
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0FDOjFGM0IwNDozNEEyMjY6NDI5NDQ4OjY5OTEyODcxIiwidmlzaXRvcl9pZCI6IjMwMTU4NzYwNzM2Njc3NjYzODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1204a2fca2420c2088e81d349656ed9cfead8d70adedd1aac68f677e85f08659
hovercard-subject-tagpull_request:131081597
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/firebase/firebase-admin-python/pull/50/files
twitter:imagehttps://avatars.githubusercontent.com/u/8410351?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/8410351?s=400&v=4
og:image:altHello, I noticed that there (according to my best knowledge) hasn't been a stream listener implemented in the project. Which has a sole responsibility to fire up a callback function (https://fi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/firebase/firebase-admin-python git https://github.com/firebase/firebase-admin-python.git
octolytics-dimension-user_id1335026
octolytics-dimension-user_loginfirebase
octolytics-dimension-repository_id84979152
octolytics-dimension-repository_nwofirebase/firebase-admin-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id84979152
octolytics-dimension-repository_network_root_nwofirebase/firebase-admin-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffirebase%2Ffirebase-admin-python%2Fpull%2F50%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffirebase%2Ffirebase-admin-python%2Fpull%2F50%2Ffiles
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=firebase%2Ffirebase-admin-python
Reloadhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Reloadhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Reloadhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
firebase https://patch-diff.githubusercontent.com/firebase
firebase-admin-pythonhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Fork 347 https://patch-diff.githubusercontent.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Star 1.1k https://patch-diff.githubusercontent.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Code https://patch-diff.githubusercontent.com/firebase/firebase-admin-python
Issues 79 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/issues
Pull requests 38 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pulls
Actions https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/actions
Projects 0 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/projects
Security 0 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/security
Insights https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pulse
Code https://patch-diff.githubusercontent.com/firebase/firebase-admin-python
Issues https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/issues
Pull requests https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pulls
Actions https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/actions
Projects https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/projects
Security https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/security
Insights https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Ffirebase%2Ffirebase-admin-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python%2Fissues%2Fnew%2Fchoose
rizasifhttps://patch-diff.githubusercontent.com/rizasif
firebase:masterhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/tree/master
rizasif:masterhttps://patch-diff.githubusercontent.com/rizasif/firebase-admin-python/tree/master
Conversation 54 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50
Commits 4 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/commits
Checks 0 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/checks
Files changed https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Adding stream listeners to sniff change in child https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#top
Show all changes 4 commits https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
62b1065 added stream rizasif Jul 18, 2017 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/commits/62b1065a77c25f4c09ca3ff35bc1504af5e61800
b8a7d4c removing unused assigments rizasif Jul 18, 2017 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/commits/b8a7d4c59984c13d2f38bd420b786bbeb1290d28
ee11d64 acess token rizasif Jul 18, 2017 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/commits/ee11d6425a4c6d1ee29dbc19f328799460866586
17ade15 acess token rizasif Jul 18, 2017 https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/commits/17ade1531322c372c9947508e78ea5bdb41cfe36
Clear filters https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
db.py https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
__init__.py https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-3c21b5abf4125e4b6c869a7a969d3ab2e103da003be71eabb865a6b9532c4ce5
sseclient.py https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-5dd0c2daf5d3cbacdc33bee7b7ed74b1fb35577be2449bafb754135a4b7a2024
firebase_admin/db.pyhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
View file https://patch-diff.githubusercontent.com/rizasif/firebase-admin-python/blob/17ade1531322c372c9947508e78ea5bdb41cfe36/firebase_admin/db.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
darrenswhitehttps://patch-diff.githubusercontent.com/darrenswhite
Mar 11, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r173663686
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Aqsa-Khttps://patch-diff.githubusercontent.com/Aqsa-K
Mar 12, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r173769330
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
abvijaykumarhttps://patch-diff.githubusercontent.com/abvijaykumar
Apr 9, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r180257545
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Aqsa-Khttps://patch-diff.githubusercontent.com/Aqsa-K
Apr 10, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r180311659
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
abvijaykumarhttps://patch-diff.githubusercontent.com/abvijaykumar
Apr 10, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r180336742
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Aqsa-Khttps://patch-diff.githubusercontent.com/Aqsa-K
Apr 14, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r181558414
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@vijjukhttps://github.com/vijjuk
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
the-c0d3rhttps://patch-diff.githubusercontent.com/the-c0d3r
Jul 13, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r202221073
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@Aqsa-Khttps://github.com/Aqsa-K
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
darrenswhitehttps://patch-diff.githubusercontent.com/darrenswhite
Jul 13, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r202274810
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
Aqsa-Khttps://patch-diff.githubusercontent.com/Aqsa-K
Jul 14, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r202520088
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@the-c0d3rhttps://github.com/the-c0d3r
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
the-c0d3rhttps://patch-diff.githubusercontent.com/the-c0d3r
Jul 15, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r202532446
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@Aqsa-Khttps://github.com/Aqsa-K
a PRhttps://github.com/Aqsa-K/firebase-admin-python/pull/1
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
darrenswhitehttps://patch-diff.githubusercontent.com/darrenswhite
Mar 10, 2018https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#r173634670
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-78f9cb6ab154ecfb6377a05832cd6aaf637f85254fff52c341c55c5cd64ffc7f
sseclient/__init__.pyhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-3c21b5abf4125e4b6c869a7a969d3ab2e103da003be71eabb865a6b9532c4ce5
View file https://patch-diff.githubusercontent.com/rizasif/firebase-admin-python/blob/17ade1531322c372c9947508e78ea5bdb41cfe36/sseclient/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/{{ revealButtonHref }}
sseclient/sseclient.pyhttps://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/files#diff-5dd0c2daf5d3cbacdc33bee7b7ed74b1fb35577be2449bafb754135a4b7a2024
View file https://patch-diff.githubusercontent.com/rizasif/firebase-admin-python/blob/17ade1531322c372c9947508e78ea5bdb41cfe36/sseclient/sseclient.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/firebase/firebase-admin-python/pull/50/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.