Repository navigation
docs(python callable functions): write the README - #1342
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the README for the Python Firebase HTTPS Callable functions Quickstart, providing comprehensive instructions on deployment, testing, and functions code. The review feedback suggests two useful documentation improvements: explicitly mentioning the Blaze billing plan requirement to prevent deployment failures, and adding Windows-specific commands for virtual environment setup to improve cross-platform usability.
|
|
||
| ## Deploy | ||
|
|
||
| 1. Create a Firebase project in the [Firebase console](https://console.firebase.google.com) and enable the **Realtime Database**. |
There was a problem hiding this comment.
Cloud Functions for Firebase (2nd gen) requires the project to be on the Blaze (pay-as-you-go) billing plan. It is highly recommended to mention this requirement here so users don't encounter deployment failures due to being on the Spark plan.
| 1. Create a Firebase project in the [Firebase console](https://console.firebase.google.com) and enable the **Realtime Database**. | |
| 1. Create a Firebase project in the [Firebase console](https://console.firebase.google.com), switch it to the **Blaze (pay-as-you-go) plan**, and enable the **Realtime Database**. |
| python3 -m venv venv | ||
| source venv/bin/activate |
There was a problem hiding this comment.
On Windows, the commands to create and activate a virtual environment are different (using python instead of python3 and venv\Scripts\activate instead of source venv/bin/activate). Adding inline comments for Windows users improves the cross-platform usability of this quickstart.
| python3 -m venv venv | |
| source venv/bin/activate | |
| python3 -m venv venv # On Windows: python -m venv venv | |
| source venv/bin/activate # On Windows: venv\Scripts\activate |
The curl section is a plain HTTP request too, so the old sentence contradicted it. The Testing tab fails because it doesn't follow the callable request format.
Python/quickstarts/callable-functions/README.mdwas empty, unlike its Node.js counterpart. #1122 also asks how to test a Python callable function, because the Testing tab in the Google Cloud console doesn't work for it.The README now describes the two functions, how to deploy them, and how to call them from a web app and with
curlagainst the emulator. It explains that callable functions expect the request body under adatakey, which is why the console's test tab can't call them.Fixes #1122