Starter project for python based lambda project.

Overview

Serverless Python Starter

Starter project for python based lambda project.

Features

  • FastAPI - Frontend dev with Hot Reload
  • API Gateway Integration (+root proxy)
  • Local Dev without API Gateway
  • Backend with Typings
  • Backend Scheduler Support - in a separate function
  • Backend SQS Support
  • S3 and DynamoDB IAM role
  • Pulumi Example
  • Shared Lib between Frontend and Backend
  • PyTest
  • Deploy via Github Action

Prerequisite

Install

$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

# Open `serverless.yml` and change `profile:` and `region:` to match
# Also uncomment API Gateway event 

$ npx serverless plugin install -n serverless-python-requirements

# If using pulumi
$ cd pulumi-example
$ npm install

# change pulumi.dev.yaml
config:
  aws:region: us-west-2
  aws:profile: varokas --- profile

$ pulumi up

Dev

$ source .venv/bin/activate
$ uvicorn main:app --reload

$ curl localhost:8000/hello
{"message":"Hello World"}%

# Docs can be found at - http://127.0.0.1:8000/docs

Serverless Dev

$ npx serverless invoke local -f backend -d '{"name": "TestEvent", "source":"raw", "text": "123"}'
$ npx serverless invoke local -f backend -d '{"name": "TestEvent", "source":"schedule", "time":"2021-12-21T15:34:19Z", "text": "123"}'

$ npx serverless deploy

$ python3 cli.py testevent Hello

$ npx serverless logs -f backend

Github Actions

Go to Settings, Secrets and set the two secret values

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

References

You might also like...
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

Boilerplate for starting a python project

Python Project Boilerplate Simple boilerplate for starting a python proect. Using the repo Follow following steps to install client on server Create a

Generic python project template

generic-python-project-template generic-python-project-template STEPS - STEP 01- Create a repository by using template repository STEP 02- Clone the n

Template to quickly start your playwright-python project

Playwright-python template 🍪 Template to quickly start your playwright-python project Getting started • Demo • Configuration Getting started Clone th

A low dependency and really simple to start project template for Python Projects.
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

A Project Template With Python
A Project Template With Python

File Structure . ├── LICENSE ├── Makefile # commands ├── README.md ├──

A Django project skeleton that is modern and cutting edge.

{% comment "This comment section will be deleted in the generated project" %} Edge A Fantastic Django project starter. Features Ready Bootstrap-themed

Project template layout for Django 3.0+

Django 3.0+ project template This is a simple Django 3.0+ project template with my preferred setup. Most Django project templates make way too many as

A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ docker-compose up Now you can access the application at https://local

Owner
null
Django project/application starter for lazybones :)

Django Project Starter Template My custom project starter for Django! I’ll try to support every upcoming Django releases as much as I can! Requirement

Uğur Özyılmazel 40 Jul 16, 2022
This is the starter for the Flask React project.

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Jami Travers 5 May 25, 2022
The starter for the Flask React project

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Parker Bolick 2 May 14, 2022
Launchr is an open source SaaS starter kit, based on Django.

Launchr Launchr is an open source SaaS starter kit. About Launchr is a fully-equipped starter template, ready to start a SaaS web app. It implements t

Jannis Gebauer 183 Jan 6, 2023
A python starter package to be used as a template for creating your own python packages.

Python Starter Package This is a basic python starter package to be used as a template for creating your own python packages. Github repo: https://git

Mystic 1 Apr 4, 2022
simple flask starter app utilizing docker

Simple flask starter app utilizing docker to showcase seasonal anime using jikanpy (myanimelist unofficial api).

Kennedy Ngugi Mwaura 5 Dec 15, 2021
Django Webpack starter template for using Webpack 5 with Django 3.1 & Bootstrap 4. Yes, it can hot-reload.

Django Webpack Starter Hello fellow human. The repo uses Python 3.9.* Django 3.1.* Webpack 5.4.* Bootstrap 4.5.* Pipenv If you have any questions twe

Ganesh Khade 56 Nov 28, 2022
A Django starter template with a sound foundation.

SOS Django Template SOS Django Tempalate is a Django starter template that has opinionated and good solutions while starting your new Django project.

Eray Erdin 19 Oct 30, 2022
The starter repository for submissions to the GeneDisco challenge for optimized experimental design in genetic perturbation experiments

GeneDisco ICLR-22 Challenge Starter Repository The starter repository for submissions to the GeneDisco challenge for optimized experimental design in

null 22 Dec 6, 2022
Python-boilerplate - Python Boilerplate Project Structure

python-boilerplate Python Boilerplate Project Structure Folder Structure .github

null 1 Jan 18, 2022