Code Package

You can upload the code through the Control panel or API. You can use one file or upload a package (module) as an archive.

Python

Single File Code

Create a file with a function without importing third party packages:

def handler(**kwargs):
    return f"Hello, {kwargs}"

Single File Code with Image Processing Libraries

The Python runtime comes pre-installed with different packages and libraries that are optimized for image processing:

  • Pillow;
  • opencv-python with the required standard libraries;
  • pyzbar с libzbar;
  • numpy;
  • imutils.

You can access these libraries by uploading the source code as a single file.

Package Code (Module)

Uploading the code as a package allows you not only to include several project files, but also specify dependencies. You need to zip the package (.zip or .tar *) before uploading it through the Control panel or API.

Use the Packaging Python Projects instructions to create a python package. The pip manager is used for creating packages and specifying their dependencies.

Node.js

Single File Code

Create a file with a function without importing third party packages:

module.exports.main = (event) => {
 return `Hello, ${event}`
}

Package Code (Module)

Uploading the code as a package allows you not only to include several project files, but also specify dependencies. You need to zip the package (.zip or .tar *) before uploading it through the Control panel or API.

Create a folder and add files with your code and package.json (that contains the dependencies) to it. Then zip the folder (.zip or .tar *) and upload the archive through the Control panel or API.