flerro / weather-api-python

A minimal serverless API implementation in Python featuring Lambda + DynamoDB + HttpApi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weather-api-python

A minimal serverless API implementation in Python

Features:

  • Lambda + DynamoDB + HttpApi (a cheaper alternative to RestApi)
  • dynamodb mapping via pynamodb

See also similar project in Java

Prerequisites

Usage

Create deployable artifact (source code + dependecies from requirements.txt):

❯ bin/package.sh

Deploy:

❯ sam deploy --guided

Invoke the remote endpoint:

❯ url=https://????.execute-api.eu-west-1.amazonaws.com/

# Add some data

❯ http $url/events < sample-payloads/oxford.json
❯ http POST $url/events < sample-payloads/brooklin.json

# Query data

❯ http GET "$url/locations?loc=Oxford, UK"

About

A minimal serverless API implementation in Python featuring Lambda + DynamoDB + HttpApi


Languages

Language:Python 94.7%Language:Shell 5.3%