Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.04 KB

README.md

File metadata and controls

31 lines (19 loc) · 1.04 KB

Serverless Python Function

This is a simple repo that demo that shows how to write a serverless function in Python, based on this blog post by Michael Lavers. Check out the post for more information about the end-to-end setup and deployment.

Development

You'll need Node, NPM, and Python installed to invoke these functions locally.

Additionally, you'll need to install the Serverless Framework globally.

npm install -g serverless

Invoke the functions locally

There are two functions included in this repo.

simple returns a static string in JSON.

serverless invoke local --function simple

httprequest makes an API call to the Dog Facts API, and returns 3 facts as JSON.

serverless invoke local --function httprequest

Check the Serverless docs for more information about running functions locally.