Google Cloud Functions is a serverless compute service that executes arbitrary code. However, at this time Google Cloud Functions is a beta service that does not work with Python.
Amazon Web Services (AWS) Lambda is currently a good alternative until Google Cloud Functions supports Python.
Serverless Cost Calculator estimates the amount that AWS would charge based on Lambda exeuctions, average execution time and memory needed per execution.
Microsoft Azure Functions vs. Google Cloud Functions vs. AWS Lambda gives an overview of these three serverless cloud platforms and compares their current capabilities.
Getting Started With Google Cloud Functions and MongoDB explains how to connect a Google Cloud Function to a persistent MongoDB data store.
Running End to End tests as Google Cloud Functions provides the code and a walkthrough for running a headless Chrome instance in a serverless Cloud Function to perform browser-based tests.