周志洋

个人站

持续学习 才能不被淘汰


Python云计算-无服务器架构

AWS Lambda

import json

def lambda_handler(event, context):
   # 处理事件
   name = event.get('name', 'World')
   
   return {
       'statusCode': 200,
       'body': json.dumps(f'Hello {name}!')
   }

Azure Functions

import azure.functions as func

def main(req: func.HttpRequest) -> func.HttpResponse:
   name = req.params.get('name')
   return func.HttpResponse(f"Hello {name}!")


转载请注明:周志洋的博客 » Python云计算-无服务器架构

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦