mangum
full-stack-fastapi-template
Our great sponsors
mangum | full-stack-fastapi-template | |
---|---|---|
17 | 28 | |
1,594 | 22,914 | |
- | - | |
2.5 | 9.4 | |
4 months ago | 6 days ago | |
Python | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mangum
- Why the Serverless Revolution Has Stalled
-
Is there any batteries-included framework designed specifically for serverless functions?(preferably Python)
Hey! I was in the same place as you are, and the best solution I found was to use Mangum (https://mangum.io/). I believe it also works with Django. Mangum is an adapter that transforms lambda events into the corresponding structure to be received by your Framework API endpoints. We are currently using it with FastAPI and it's great. We code our backend without thinking about whether it will run on Lambda, and Magum takes care of the rest.
-
Is it really advisable to try to run fastapi with predominantly sync routes in a real world application?
In the real world I'm never using static cloud resources. It's all serverless, containers, or horizontal auto-scaling. I let the infrastructure handle asynchronous scaling when needed. For FastAPI specifically I've used Mangum: https://mangum.io/ to provide the asynchronous invocation below the ASGI layer. Then all my FastAPI code can just be synchronous.
-
Options to host a ReactJS + FastAPI + SQLlite application?
I discovered https://github.com/jordaneremieff/mangum which basically transforms a fastapi app to be compatible with aws lambda.
-
Serverless Rest API : api gateway + lambda with RDS database
Should I create only 1 apigtw resource with 1 lambda and use mangum + fastapi for my rest api ?
-
Yet another implementation for Slack Commands
Mangum: For the integration of the Aws Lambda and the Api Gateway with the FastApi
-
AWS with a Django app
If you go the lambda route, you can use DRF (or any ASGI app) using https://mangum.io/
-
Running Containers on AWS Lambda
Yes, it's possible to wrap any asgi app to run in a lambda. Check out Mangum https://github.com/jordaneremieff/mangum
-
Observability Best Practices when running FastAPI in a Lambda
But we do not have a handler function, do we? We have a Mangum object wrapping the FastAPI application. Luckily, the Mangum object acts as a handler function, so we can just add the following in example/src/app/__init__.py:
-
Django Rest API with AWS lambda or any other server less
I've used fastapi in a lambda. The package Mangum simplifies the conversion of lambda handler to a more tradition request.
full-stack-fastapi-template
-
Building a Secure API with FastAPI, PostgreSQL, and Hanko Authentication
This project is a modification of the authentication flow of the awesome repository made by tiangolo at full-stack-fastapi-postgresql
- Do you know any quality FastAPI starter projects?
-
What is a sensible way to go about designing an authentication microservice?
FastAPI with a PostgreSQL database: https://github.com/tiangolo/full-stack-fastapi-postgresql/tree/master
- Faster way to kickstart and develop backend REST apis?
-
Is a Framework like Django possible in Rust
Ha! I do write SQL since that's where I cut my teeth many years ago. But I mostly use stored procedures where possible. I prefer not to use ORMs - sorry I don't find that side work... I am not saying Django's was bad or inferior, just do not prefer it. For FastAPI - maybe you missed the various repos with everything you mentioned was missing (there are great ones directly from the maintainer as well as others). No more glue than what you find in all the modules in a large Django project, just maybe in different forms and flavors. Besides, we're here to talk about Rust, making me wonder why we're debating two Python projects. Yes, I fell in love with Django, the romance faded in 2018, and I moved on. Feel free to enjoy using it - I'm not trying to sway you away from it!
- Is there any open source project that uses FasAPI?
-
How to build a scalable project file structure for a beginner.
I've just recently switched to a structure that follows Netflix's Dispatch application after starting with https://github.com/tiangolo/full-stack-fastapi-postgresql and it feels way better and organized.
- ORM for FastAPI+PostgreSQL, Tortoise or Sqlalchemy? what would you choose and why?
-
Creating a webpage for data entry
Honestly your easiest option for data gathering would be to create google spreadsheets/forms and give each municipality access. For a custom data entry platform I suggest looking for templates like this one and learning how to add custom logic to the boilerplate: https://github.com/tiangolo/full-stack-fastapi-postgresql
-
FastAPI Best Practices
I would encourage you to take a look at this repo: https://github.com/tiangolo/full-stack-fastapi-postgresql This is a boilerplate of an application made with fastapi, prepared by the creator of the fastapi himself. You can even set it up yourself locally and have a look how it’s organised. I know it has a lot of different services included, but I find the fastapi part itself to be well thought. Inside the api directory you can notice another folder named api_v1, so you can have multiple versions of your API routes when needed, with the general code in other places that is more generic and can be reused in all your different API versions. The schemas are separated from the models and models itself have different classes depending on what you would actually like to do with the data. The migrations are managed with alembic based on schemas rather than models itself. The settings are a python class that implicitly reads the .env file in your project’s directory. And many, many other interesting patterns to explore. Too much to write in one comment to be honest.
What are some alternatives?
Zappa - Serverless Python
fastapi-starter - A FastAPI based low code starter/boilerplate: SQLAlchemy 2.0 (async), Postgres, React-Admin, pytest and cypress
docker-flask-example - A production ready example Flask app that's using Docker and Docker Compose.
fastapi-react - 🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker
aws-simple-websocket - Using AWS's API Gateway + Lambda to run a simple websocket application. For learning/testing.
uvicorn-gunicorn-fastapi-docker - Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning.
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
cookiecutter-djangopackage - A cookiecutter template for creating reusable Django packages quickly.
fastapi-crudrouter - A dynamic FastAPI router that automatically creates CRUD routes for your models
fastapi-users - Ready-to-use and customizable users management for FastAPI
chalice - Python Serverless Microframework for AWS
docker-celery-flower - Minimum docker/fastapi/celery/flower setup