MCPcopy Index your code
hub / github.com/bennybauer/serverless-python-sample / list_posts

Function list_posts

handler.py:10–22  ·  view source on GitHub ↗

Retrieve posts list

(event, context)

Source from the content-addressed store, hash-verified

8
9
10def list_posts(event, context):
11 """ Retrieve posts list """
12 url = API_HOST + '/posts'
13
14 log.debug('calling ' + url)
15 res = requests.get(url)
16
17 response = {
18 "statusCode": res.status_code,
19 "body": res.text
20 }
21
22 return response
23
24
25def get_post(event, context):

Callers 1

test_list_postsMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_list_postsMethod · 0.72