now-python-lambda
v1.0.20
Published
A [now builder](https://zeit.co/docs/v2/deployments/builders/overview/]) for creating python lambda functions.
Downloads
11
Readme
now-python-lambda
A now builder for creating python lambda functions.
Example usage
now.json
{
"version": 2,
"name": "now-python-lambda-example",
"builds": [
{
"src": "backend/config.json",
"use": "now-python-lambda"
}
]
}
backend/config.json
{
"functions": {
"hello_world": {
"entrypoint": "api/hello_world",
"handler": "hello_world.handler"
}
}
}
backend/hello_world.py
import json
def handler(event, context):
return {
'statusCode': 200,
'headers': {
'content-type': 'application/json'
},
'body': json.dumps({
'data': 'hello world'
})
}