fastapi-crudrouter
mangum
Our great sponsors
fastapi-crudrouter | mangum | |
---|---|---|
4 | 17 | |
1,295 | 1,568 | |
- | - | |
0.0 | 2.5 | |
5 months ago | 3 months ago | |
Python | Python | |
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.
fastapi-crudrouter
-
FUNCTOOLS CHANGED MY LIFE
I can't show any pics cuz of uk NDA and all that. I can tell you the gist of it though. FastAPI is already pretty good at the abstraction part. Our middleware had a lot of rerouting and it was basically just a bunch of redundant functions. I just used this cool ass package https://fastapi-crudrouter.awtkns.com/ and used the partial function from functools to generate endpoints for every scenario/db tables.
-
FastAPI framework, high perf, easy to learn, fast to code, ready for production
Thanks, that's a really helpful example.
Where I think this could be taken to the next level of reusability is in modularising the front-end into API-specific components. For example, the login behaviour could depend on FastAPI-Users, with a sibling frontend library containing components that implement the same login flow. Adding user behaviour is then a matter of using the same third-party library on the front and back end.
This approach could be extended to other components such as an admin panel (perhaps using https://github.com/awtkns/fastapi-crudrouter), or a blogging component.
mangum
-
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
-
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:
-
Deploy FastAPI on AWS Part 1: Lambda & API Gateway
We will create a very simple FastAPI application with a single route, /. To bridge the gap between the Lambda event payload and FastAPI we will use a library called mangum. This library acts as an adapter for ASGI applications running inside a Lambda that's invoked by AWS API Gateway.
-
Building a Converter Tool on Web
Seconded. See Zappa, Mangum, Chalice and Serverless for some great frameworks that ease adoption of this pattern.
-
FastAPI framework, high perf, easy to learn, fast to code, ready for production
It does when paired with mangum https://github.com/jordaneremieff/mangum
What are some alternatives?
starlite - Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs [Moved to: https://github.com/litestar-org/litestar]
Flask-AppBuilder - Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
Zappa - Serverless Python
docker-flask-example - A production ready example Flask app that's using Docker and Docker Compose.
aws-simple-websocket - Using AWS's API Gateway + Lambda to run a simple websocket application. For learning/testing.
fastapi-users - Ready-to-use and customizable users management for FastAPI
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
chalice - Python Serverless Microframework for AWS
Dask - Parallel computing with task scheduling
starsessions - Advanced sessions for Starlette and FastAPI frameworks
titiler - Build your own Raster dynamic map tile services
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)