Flask Function as a Service
flask-faas
Migrating from serverless to a server application can be a headache at times. flask-faas provides you a layer that sits on top of your existing serverless application handlers and helps them convert to Flask routes. The prime goal is to be easy to use and easier to port. We currently support Google Cloud Function, AWS Lambda and OpenFaaS. We would have Azure Functions on the roadmap shortly.
Just import and use, no extra hassle!
from flask_faas.gcp import google_cloud_function
from flask_faas.aws import aws_lambda
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/gcp/<arg0>",methods=["GET"])
@google_cloud_function
def my_cloud_function_handler(req):
return jsonify(req.view_args)
@app.route("/aws/<arg0>/<arg1>",methods=["GET"])
@aws_lambda
def my_lambda_handler(event, context):
return jsonify([event["pathParameters"]])
if __name__ == '__main__':
app.run()
Supported FaaS handler
- Google Cloud Function
- AWS Lambda
- OpenFaaS
TODO
- Azure Function
Resources:
Metadata
Release files for flask-faas 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask-faas-0.0.1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_faas-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / flask-faas-0.0.1.tar.gz
| Download URL | flask-faas-0.0.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84b37a7a529a4f9320ed849c9dc1e9c1ccf87ae8ee0a5be59102f43c82721ab9
|
|
BLAKE2b-256 checksum How to use checksums |
5265932e5ddbb6e5229e4889fe55b785dc24f640ad497167a0d6b2ebbbe134ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / flask_faas-0.0.1-py3-none-any.whl
| Download URL | flask_faas-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2baa117afa0526b3fc9686f5f3e860773a69fb00a62a55a23eb4c9539d035bf0
|
|
BLAKE2b-256 checksum How to use checksums |
ac0b3904c5c1de31d2e3a97e45404f2d4d4ad1d32004a9c2377f205aa48bb8c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|