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

Cookiecutter-allpurpose-minimal-python - A simple cookiecutter template for general-purpose python projects.

cookiecutter-allpurpose-minimal-python A simple cookiecutter template for general-purpose python projects. To use, run pip install cookiecutter cookie

E. Tolga Ayan 2 Jan 24, 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
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
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 04, 2022
Boilerplate code for a Python Flask API

MrMat :: Python :: API :: Flask Boilerplate code for a Python Flask API This variant of a Python Flask API is code-first and using native Flask Featur

0 Dec 26, 2021
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
A platform for developers 👩‍💻 who wants to share their programs and projects.

Hacktoberfest-2021 A platform for developers 👩‍💻 who wants to share their projects and programs. Hacktoberfest has updated their rules and now this

Mayank Choudhary 40 Nov 07, 2022
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

Constantin 1 Dec 13, 2021
NHS Theme for Streamlit applications

NHS Streamlit App Template Deployment (local) The tool has been built using Stre

nhs.pycom 3 Nov 07, 2022
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
Brif is a boilerplate tool based on Docker and FastAPI, designed to streamline the development and deployment of IIIF compliant platforms.

brif A boilerplate tool based on Docker, designed to streamline the development and deployment of IIIF compliant platforms. Embedded with FastAPI, Cel

Pierre 8 Sep 17, 2022
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
Simple boilerplate ready for development

StartApp Simple boilerplate ready for development Notes Currently supported frameworks are: FastApi, Flask 🔨 Installation $ sudo pip3 install starta

Sabuhi 16 Oct 16, 2022
A framework for launching new Django Rest Framework projects quickly.

DRFx A framework for launching new Django Rest Framework projects quickly. Comes with a custom user model, login/logout/signup, social authentication

William Vincent 400 Dec 29, 2022
A template repo for use in the Advent of Code

AoC-Template A template repo for use in the Advent of Code The README_template.md must contain "STATS_TABLE" to be replaced by the generated table, an

0 Jan 14, 2022
A boilerplate Django project for quickly getting started.

The Definitive Django Learning Platform. Django Project Boilerplate This repository is a boilerplate Django project for quickly getting started. Getti

Le Huynh Long 1 Nov 01, 2021
Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.

FastAPI and Django Combo This projects aims to combine FastAPI and Django to build a Production ready application capable of utilizing all of the feat

Nsikak Imoh 33 Dec 27, 2022
A full stack boilerplate for FastAPI

A full stack boilerplate for FastAPI

Tyler M. Kontra 94 Dec 13, 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
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