Function Development

Supported Runtimes

The Node.js, Java, Python, Go, C#, PHP, and custom runtimes are supported. Table 1 lists the supported runtimes.

You are advised to use the latest runtime version.

Table 1 Runtime description

Runtime

Supported Version

SDK Download Link

Runtime Download Link

Node.js

6.10, 8.10, 10.16, and 12.13

-

-

Python

2.7 and 3.6

-

Python 2.7 Runtime

Python 3.6 Runtime

NOTE:

The Python runtime has integrated with common third-party SDKs listed in Table 3.

Java

8.0

Java SDK

NOTE:

The Java runtime has integrated with Object Storage Service (OBS) SDKs.

-

Go

1.8 and 1.x

Go1.8.3 SDK

Go1.x SDK

-

C#

.NET Core 2.0, .NET Core 2.1, and .NET Core 3.1

CsharpSDK

-

PHP

7.3

-

-

Custom

-

-

-

Third-Party Components Integrated with the Node.js Runtime

Table 2 Third-party components integrated with the Node.js runtime

Name

Usage

Version

q

Asynchronous method encapsulation

1.5.1

co

Asynchronous process control

4.6.0

lodash

Common tool and method library

4.17.10

esdk-obs-nodejs

OBS SDK

2.1.5

express

Simplified web-based application development framework

4.16.4

fgs-express

Uses the Node.js application framework to run serverless applications and REST APIs in FunctionGraph and API Gateway. This component provides an example of using the Express framework to build serverless web applications or services and RESTful APIs.

1.0.1

request

Simplifies HTTP invocation and supports HTTPS and redirection.

2.88.0

Non-Standard Libraries Integrated with the Python Runtime

Table 3 Non-standard libraries integrated with the Python Runtime

Library

Usage

Version

dateutil

Date and time processing

2.6.0

requests

HTTP library

2.7.0

httplib2

HTTP client

0.10.3

numpy

Mathematical computation

1.13.1

redis

Redis client

2.10.5

obsclient

OBS client

-

smnsdk

Simple Message Notification (SMN) access

1.0.1

Sample Project Packages

Table 4 provides the links for downloading the sample project packages mentioned in this document. You can download the project packages to a local path and upload them when creating functions.

Table 4 Download links of the sample project packages

Function

Project Package

Node.js function

fss_examples_nodejs6.10.zip

Python function

fss_examples_python2.7.zip

Java function

fss_example_java8.jar

Go function

fss_examples_go1.8.zip

C# function

fss_example_csharp2.0 and fss_example_csharp2.1

PHP function

fss_examples_php7.3.zip

CLI

FunctionGraph provides the command line interface (CLI) for managing functions, triggers, and aliases, and invoking functions. CLI can run on a 64-bit Linux OS, 64-bit Windows OS, or macOS. Table 5 provides the download links and MD5 verification codes for the CLI.

Table 5 Download links of the CLI

OS

Download Link

MD5 Verification Code

Linux

CLI for Linux

5d6332f839749ef80547f1b8561df9d3

Windows

CLI for Windows

73607b2fe289293ab49f17a0b4f61cf5

macOS

CLI for macOS

94d5667472a7f4f696d12e7834503229

HSS

Huawei Serverless Sandbox (HSS) is used to test functions locally, verify Huawei Serverless Application Model (HSAM) templates, and generate valid sample payloads for different event sources. Table 6 provides the download links and MD5 verification codes for the HSS.

Table 6 Download links for the HSS

OS

Download Link

MD5 Verification Code

Linux

HSS for Linux

e70816fef93cf854c8c7d350e4a4a371

macOS

HSS for macOS

54b18c96e662f0b31a68b5967cf59f18

Windows

HSS for Windows

30b1184db23f250530c0794d77faf937