Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (20 loc) · 592 Bytes

python.md

File metadata and controls

25 lines (20 loc) · 592 Bytes

Python

The handler for a Python function should be the path to the file, followed by the function to call. For example with a file structure like:

- src
  - handlers
  - firstHandler.py  => def my_first_handler
  - secondHandler.py => def my_second_handler
- serverless.yml

Your serverless.yml would look like:

provider:
  runtime: python310
functions:
  first:
    handler: src/handlers/firstHandler.my_first_handler
  second:
    handler: src/handlers/secondHandler.my_second_handler

You can find more Python examples in the examples folder.