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

Backend Boilerplate using Django,celery,Redis

Backend Boilerplate using Django,celery,Redis

Daniel Mawioo 2 Sep 14, 2022
Django starter project with 🔋

A batteries-included Django starter project. For a production-ready version see the book Django for Professionals. 🚀 Features Django 3.1 & Python 3.8

William Vincent 1.5k Jan 08, 2023
Template for creating PyPI project

template-for-creating-pypi-project Template for creating PyPI project Hello there! This is a template for creating a PyPI project. Fork or clone this

4 Apr 25, 2022
A Boilerplate repo for Scientific Python Open Science projects

A Boilerplate repo for Scientific Python Open Science projects Installation Clone this repo If you need a fresh python environment, run $ conda env cr

Vincent Choqueuse 2 Dec 23, 2021
A full stack boilerplate for FastAPI

A full stack boilerplate for FastAPI

Tyler M. Kontra 94 Dec 13, 2022
Generic template for python service

Cookie cutter template example Technology stack Flask Gevent UWSGI Poetry Docker Docker-compose Installation pip install cookiecutter cookiecutter git

Churkin Oleg 11 Oct 22, 2022
Template for creating ds simple projects

ds-project-template Template for creating ds simple projects Requirements pyenv python==3.9.4 Setup For this purpose you use following commands: pytho

1 Dec 17, 2021
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 04, 2023
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

22 Dec 06, 2022
A test Django application with production-level docker setup

DockerApp A test Django application with production-level docker setup. Blog: https://medium.com/@siddharth.sahu/the-near-perfect-dockerfile-for-djang

Siddharth Sahu 44 Nov 18, 2022
Mad-cookiecutter - Cookiecutter templates for MaD projects

MaD Cookiecutter Templates A set of templates that can be used to quickly get st

Machine Learning and Data Analytics Lab FAU 1 Jan 10, 2022
Setup a flask project using a single command, right from creating virtual environment to creating Procfile for deployment.

AutoFlask-Setup About AutoFlask-Setup can help you set up a new Flask Project, right from creating virtual environment to creating Procfile for deploy

Ashutosh Krishna 1 Oct 21, 2021
Starter project for python based lambda project.

Serverless Python Starter Starter project for python based lambda project. Features FastAPI - Frontend dev with Hot Reload API Gateway Integration (+r

4 Feb 22, 2022
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

18.7k Jan 08, 2023
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

Prajwal Dahal 1 Nov 19, 2021
A Project Template With Python

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

Annotation AI 61 Jan 02, 2023
This is a FastAPI, React, MongoDB stack Boilerplate. It's as glorious as a highland coo.

Coo - F.A.R.M stack BoilerPlate F.A.R.M - FastAPI, React, MongoDB This boilerplate utilizes FastAPI to build a REST API, MongoDB for data storage, and

Peter Waters 2 Feb 06, 2022
A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Anton Pirogov 3 Jul 19, 2022
Open-source full-stack seed project that uses a React UI powered by a simple Flask API Server

React Flask Authentication Open-source full-stack seed project that uses a React UI powered by a simple Flask API Server.

App Generator 37 Dec 24, 2022
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

José Padilla 649 Dec 30, 2022