I’m a bit unclear on what exactly you’re trying to do, but the answer is almost certainly “yes.” If you’re just looking for endpoints that you can reach asynchronously as part of your application (e.g. multiple loads with Ajax,), flask handles that natively - parallel requests are built in. It works oodles better with wsgi over the built in dev server so don’t let that throw you off. If you’re looking for references on how to get started with something that you host and others access, Check out this reference for a good tutorial ok REST APIs, which are a commonly used interface that everyone should know how to handle https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask Edit: I just found out flask has a package for that now. Even easier https://flask-restful.readthedocs.io/en/latest/ If you’re wondering if you can pull from multiple APIs out there already and redistribute it with your own API, of course you can using a combination of the existing Interfaces and something like above. Careful with that though - big companies don’t like you redistributing their hard earned data. Does any of this sound like your goal? If not, could you describe your intended use a bit more? Answer from trevg_123 on reddit.com
Reddit
reddit.com › r/flask › how to make an api gateway in flask
r/flask on Reddit: How to make an API gateway in Flask
January 24, 2020 -
I have some http API endpoints and I want to make a flask app to aggregate their results with some custom logic.
Is it possible to call the external endpoints asynchronously in flask?
Is there any packages/examples of doing this ?
Top answer 1 of 3
5
I’m a bit unclear on what exactly you’re trying to do, but the answer is almost certainly “yes.” If you’re just looking for endpoints that you can reach asynchronously as part of your application (e.g. multiple loads with Ajax,), flask handles that natively - parallel requests are built in. It works oodles better with wsgi over the built in dev server so don’t let that throw you off. If you’re looking for references on how to get started with something that you host and others access, Check out this reference for a good tutorial ok REST APIs, which are a commonly used interface that everyone should know how to handle https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask Edit: I just found out flask has a package for that now. Even easier https://flask-restful.readthedocs.io/en/latest/ If you’re wondering if you can pull from multiple APIs out there already and redistribute it with your own API, of course you can using a combination of the existing Interfaces and something like above. Careful with that though - big companies don’t like you redistributing their hard earned data. Does any of this sound like your goal? If not, could you describe your intended use a bit more?
2 of 3
2
This tutorial seems to cover part of what you're talking about: https://hackernoon.com/how-to-run-asynchronous-web-requests-in-parallel-with-python-3-5-without-aiohttp-264dc0f8546
GitHub
github.com › ozanonurtek › flask-microservices-with-kong
GitHub - ozanonurtek/flask-microservices-with-kong: This is a simple demonstration of how to use Kong as an api gateway of Python/Flask Microservices.
This is a simple demonstration of how to use Kong as an api gateway of Python/Flask Microservices. This tutorial uses DBless setup(declarative_config) of Kong because of its simplicity.
Starred by 16 users
Forked by 4 users
Languages Python 94.1% | Makefile 5.9% | Python 94.1% | Makefile 5.9%
python - Call AWS API Gateway from Flask server - Stack Overflow
I am using flask-cognito-lib and AWS Cognito to authentical users. I am able to follow the example code to secure Flask endpoints. from flask import Flask, jsonify, redirect, session, url_for from More on stackoverflow.com
python 3.x - API Gateway failing on all paths with flask - Stack Overflow
The APIs are working locally on the instance itself ... I sorted it out. Could not see the wood for the trees, I was calling the integration method with :PORT on the URI. Obviously, flask read the URI as URI:PORT and went what are you talking about. More on stackoverflow.com
Does API Gateway replace web frameworks?
Sometimes. In software engineering, rarely is one tool the right tool for every problem. So you could never claim that Flask or any similar framework is now obsolete because of API Gateway. API-G is relatively simplistic in its feature set and forces you into their way of thinking. Maybe if you only had a couple of requests and operations then you could do it entirely within API-G, but once you start getting lots of routes with tons of lambdas or other behavior that API-G doesn't quite support, then that's when Flask and friends start to shine. If your website is simple enough to fit into API-G's model, and that's all you need. Then go for it. More on reddit.com
How to make an API gateway in Flask
I’m a bit unclear on what exactly you’re trying to do, but the answer is almost certainly “yes.” If you’re just looking for endpoints that you can reach asynchronously as part of your application (e.g. multiple loads with Ajax,), flask handles that natively - parallel requests are built in. It works oodles better with wsgi over the built in dev server so don’t let that throw you off. If you’re looking for references on how to get started with something that you host and others access, Check out this reference for a good tutorial ok REST APIs, which are a commonly used interface that everyone should know how to handle https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask Edit: I just found out flask has a package for that now. Even easier https://flask-restful.readthedocs.io/en/latest/ If you’re wondering if you can pull from multiple APIs out there already and redistribute it with your own API, of course you can using a combination of the existing Interfaces and something like above. Careful with that though - big companies don’t like you redistributing their hard earned data. Does any of this sound like your goal? If not, could you describe your intended use a bit more? More on reddit.com
Videos
25:16
Deploy Flask App (FE + BE) on AWS Lambda and API Gateway by ...
49:09
Build APIs with Flask (the right way) - YouTube
37:54
Create a Serverless Python API | AWS Amplify, AWS Lambda, Flask, ...
13:28
How to invoke API endpoint using python - Amazon API Gateway p25 ...
26:35
Serverless Rest API using AWS and Python | Flask DynamoDB Integration ...
10:15
Deploy a Serverless Flask App using Zappa - YouTube
Medium
medium.com › @coderviewer › building-a-flask-api-gateway-for-grpc-microservices-a-practical-guide-f912aed73b94
Building a Flask API Gateway for gRPC Microservices: A Practical Guide | by Barkhayot | Medium
January 11, 2024 - # Terminal 2 python app.py · In this post, we’ve built a simple Flask API Gateway that serves as a client to a gRPC microservice responsible for fetching book data. This architecture provides flexibility, allowing for future expansion of microservices while presenting a consistent API to the client.
Towards Data Science
towardsdatascience.com › home › latest › deploy a python api on aws
Deploy a Python API on AWS | Towards Data Science
March 5, 2025 - This is a flask app, where the key lies in the app.py file, and this app receives your resume and help refer you internally. Notice that we don’t even need a docker file, the AWS Lambda is so light-weighted that you don’t even need to wrap your code in a container! ... makes it super easy to build and deploy server-less, event-driven Python applications (including, but not limited to, WSGI web apps) on AWS Lambda + API Gateway...
GitHub
github.com › J-sephB-lt-n › api-gateway-reverse-proxy-python-flask
GitHub - J-sephB-lt-n/api-gateway-reverse-proxy-python-flask: A simple API Gateway (reverse proxy) implementation in python using requests and Flask
~$ flask --app gateway run --port 5000 & ~$ curl --location 'http://localhost:5000/does_not_exist/v1' endpoint '/does_not_exist/v1' not found ~$ curl -X POST --location 'http://localhost:5000/test_post_request/v1' --header 'Content-Type: application/json' --data '{"test": 123}' <returns response from https://httpbin.org/post> ~$ pkill -f flask -SIGTERM · Because an API-Gateway is by nature I/O-bound (i.e.
Author J-sephB-lt-n
Heuristictechnopark
heuristictechnopark.com › blog › building-scalable-web-api-python-flask-fastapi-aws-api-gateway
Scalable Python Web API: Flask/FastAPI & AWS Guide | Heuristic Technopark
AWS Lambda Functions: The API Gateway invokes Lambda functions written in Python (using Flask or FastAPI) to handle the request.
Stack Overflow
stackoverflow.com › questions › 76085253 › call-aws-api-gateway-from-flask-server
python - Call AWS API Gateway from Flask server - Stack Overflow
API endpoint: https://<endpoint ID>.execute-api.<region>.amazonaws.com/default/<endpoint-name> Details API type: HTTP Authorization: JWT Authorizer ID: <auth-ID> CORS: No Detailed metrics enabled: No Method: ANY Resource path: /<endpoint-name> Service principal: apigateway.amazonaws.com Stage: default Statement ID: <stmt-ID> ... Didn't get your question properly are you trying to deploy flask on AWS lambda and trying to call your custom endpoint(login,postlogin etc)?
Stack Overflow
stackoverflow.com › questions › 71251028 › api-gateway-failing-on-all-paths-with-flask
python 3.x - API Gateway failing on all paths with flask - Stack Overflow
application = Flask(__name__, template_folder="template" ) @application.route('/', methods=["POST","GET","PUT"]) def start(): return "Hello World" if __name__ == "__main__": serve (application) It is started with the command in an EC2 userdata.sh file as the host is in an EC2 ASG: waitress-serve --port=8080 application:application · I have a Network load balancer listening on 443 to API gateway.
Medium
medium.com › @xinweiiiii › deploying-a-python-rest-api-to-serverless-infrastructure-aws-lambda-and-fargate-4ab2def1c193
Deploying a Python REST API to Serverless Infrastructure (AWS Lambda) | by Wong Xin Wei | Medium
May 12, 2022 - Once the Serverless framework deploys the App, it creates all of the above resources on AWS and exposes the REST API through the API Gateway. ... To test the API endpoints, you can navigate to postman and test it. In just a few steps, we have successfully deploy a Flask API on AWS lambda.
Hacksaw
hacksaw.co.za › blog › flask-on-aws-serverless-a-learning-journey-part-1
Flask on AWS Serverless: A learning journey - Part 1 - Hacksaw
December 29, 2023 - Response streaming transforms user experience by sending data progressively as it becomes available. Includes a description of a serverlessland pattern demonstrating an API Gateway REST API that invokes a Python Lambda function.