Python - firebase function

507 views
Skip to first unread message

Karthick Subramanian

unread,
Apr 2, 2020, 8:23:57 AM4/2/20
to fireba...@googlegroups.com
Hi All,

Can I write my logic in python and deploy it as Cloud functions in Firestore? I noticed that only the node.js is supported. Is there any alternative for this. 

Sam Stern

unread,
Apr 2, 2020, 8:28:59 AM4/2/20
to Firebase Google Group
Hi Karthick,

If you're comfortable using Google Cloud tools (like the gcloud CLI) you can write Cloud Functions in Python:
https://cloud.google.com/functions/docs/quickstart-python

You can even receive most of the same events, like triggers from Firestore or the Realtime Database:

These functions will have the performance and billing model you're familiar with from Cloud Functions for Firebase.  However these functions will need to be written and deployed using Google Cloud tools.  There's no "firebase-functions" SDK for Python, the Firebase CLI doesn't work with Python, and we don't document Python techniques.

- Sam

On Thu, Apr 2, 2020 at 8:23 AM Karthick Subramanian <ksubra...@alaqtech.com> wrote:
Hi All,

Can I write my logic in python and deploy it as Cloud functions in Firestore? I noticed that only the node.js is supported. Is there any alternative for this. 

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAPy8zmn_9OFt3PKFfYsoQyGw2KXSmFS7HEKMxDb8C9AayBrkPg%40mail.gmail.com.

Karthick Subramanian

unread,
Apr 2, 2020, 8:54:32 AM4/2/20
to fireba...@googlegroups.com
Thank you Sam. So I can use Firebase admin sdk for python in GCP CF to call the Firebase. Is there any wrong in my understanding, Please let me know.

Sam Stern

unread,
Apr 2, 2020, 8:57:03 AM4/2/20
to Firebase Google Group
That's exactly right, good luck!

- Sam

Hiranya Jayathilaka

unread,
Apr 2, 2020, 3:04:29 PM4/2/20
to fireba...@googlegroups.com

Karthick Subramanian

unread,
Apr 2, 2020, 10:33:54 PM4/2/20
to fireba...@googlegroups.com
This is really helpful. Thank you very much Hiranya. I am not sure whether some of the shortcomings that you mentioned in this article has been addressed over this period time. 

Anyhow, I will start explore this further. This is really a good starting point for me. Thanks for this article.

If anyone else in this group used python admin SDK and GCF wants to share any spoiler alert or anything else, please let me know. 

Reply all
Reply to author
Forward
0 new messages