Serverless API Framework

This framework is designed to make it a breeze to deploy your Serverless Functions on Scaleway’s infrastructure.

No need for configuration files, the framework makes it possible to configure your functions directly from your code.

Configuring

Writing a Serverless app and configuring your functions.

Deploying

Instructions to deploy your project with the CLI tool.

API Gateway

Instructions to create an API gateway to manage HTTP routing to functions.

Examples

Examples to get you started.

Quickstart

Installation

pip install scw_serverless

This will install scw-serverless:

scw-serverless --help

The tool uses the same configuration as the Scaleway CLI to access your account. This includes the environment variables.

Usage

Annotate your Python functions with the func decorator:

from scw_serverless import Serverless

app = Serverless("hello-namespace")

@app.func(memory_limit=256)
def hello_world(event, context):
    return "Hello World!"

Deploy with the scw-serverless tool:

scw-serverless deploy handler.py

To learn more about the different configuration options, check out Configuring.