Tiny speed-ups for Python code
Here’s a bunch of examples looking at micro-optimisations in Python code. Testing if a variable matches 1 or none of 2 values You have a variable and want to test if it is any of 2 values. Should you...
View ArticleMetadata on App Engine
There are various bits of metadata about your project and the current request available to your Web app when running on Google App Engine. Let’s see what they are. These notes show how to access things...
View ArticleFinding the Cloud Tasks location from App Engine
When using the Google Cloud Tasks API you need to specify the project ID and location. It would be good to not hard-code these for your app, and instead determine the values when the application starts...
View ArticleFind your website’s URL on Cloud Run
If you have a Python app on Google Cloud Run, how can your app determine its own website URL? When you deploy to Cloud Run, you specify a service name, and every app deployed to Cloud Run gets a unique...
View ArticleNotes for logging with Python on App Engine
These are my notes for how logging works for Python applications on Google App Engine and how it integrates with Cloud Logging. I used the logging_tree package to understand how Python’s logging system...
View Article