What's New

IBM Cloud Functions Improves Performance for Python 3.7 Actions

Share this post:

What’s happening with IBM Cloud Functions and Python?

I’m excited to announce that IBM Cloud Functions Python 3.7 runtime has been optimized for latency. The updated Python 3.7 runtime leverages a new web proxy built with Go that replaces the previous Python web proxy. The web proxy allows action invocations to respond faster by providing lower latency for blocking calls.

Ready to try it out?

  1. Create the following Python file.

    def main(args):
    name = args.get("name", "IBM Cloud")
    greeting = "Hello, " + name + "!"
    return {"body": greeting}
  2. Create the helloPython action.

    ibmcloud fn action update helloPython hello.py --kind python:3.7 --web true
  3. Invoke the action.

    ibmcloud fn action invoke helloPython -r
    {
    "body": "Hello IBM Cloud!"
    }
  4. Get the URL for the web action.

    ibmcloud fn action get helloPython --url
  5. Open the URL in your browser.

How much faster is Python 3.7?

Python 3.7 is much faster than previous versions of Python, as you can see in the graph below comparing warm invocation performance. Start new projects by using Python 3.7 or migrate any existing actions.

How do I learn more?

To set up a project and deploy your Python 3.7 action, check out the IBM Cloud Functions documentation.

Senior Technical Staff Member (STSM) - IBM Cloud Functions

More What's New stories
May 3, 2019

Kubernetes Tutorials: 5 Ways to Get You Building Fast

Ready to start working with Kubernetes? Want to build your Kubernetes skills? The five tutorials in this post will teach you everything you need to know about how to manage your containerized apps with Kubernetes.

Continue reading

May 3, 2019

Using Portworx to Deploy and Manage an HA MySQL Cluster on IBM Cloud Kubernetes Service

This tutorial is a walkthrough of the steps involved in deploying and managing a highly available MySQL cluster on IBM Cloud Kubernetes Service.

Continue reading

May 2, 2019

Kubernetes v1.14.1 Now Available in IBM Cloud Kubernetes Service

We are excited to announce the availability of Kubernetes v1.14.1 for your clusters that are running in IBM Cloud Kubernetes Service. IBM Cloud Kubernetes Service continues to be the first public managed Kubernetes service to support the latest upstream versions from the community.

Continue reading