{"id":20053713,"url":"https://github.com/glitchfix/flask-faas","last_synced_at":"2025-03-02T09:16:02.066Z","repository":{"id":57430301,"uuid":"387908347","full_name":"Glitchfix/flask-faas","owner":"Glitchfix","description":"convert your serverless functions to flask applications.","archived":false,"fork":false,"pushed_at":"2021-07-22T11:14:48.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T01:38:38.537Z","etag":null,"topics":["aws","aws-lambda","cloud","flask","gcp-cloud-functions","migration","openfaas","python","serverless","serverless-functions"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Glitchfix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-20T20:37:11.000Z","updated_at":"2024-02-16T10:09:36.000Z","dependencies_parsed_at":"2022-08-26T04:43:23.881Z","dependency_job_id":null,"html_url":"https://github.com/Glitchfix/flask-faas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glitchfix%2Fflask-faas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glitchfix%2Fflask-faas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glitchfix%2Fflask-faas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glitchfix%2Fflask-faas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glitchfix","download_url":"https://codeload.github.com/Glitchfix/flask-faas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482100,"owners_count":19969850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","cloud","flask","gcp-cloud-functions","migration","openfaas","python","serverless","serverless-functions"],"created_at":"2024-11-13T12:28:46.320Z","updated_at":"2025-03-02T09:16:02.035Z","avatar_url":"https://github.com/Glitchfix.png","language":"Python","readme":"# Flask Function as a Service\n\n[![Linkedin Badge](https://img.shields.io/badge/-Shivanjan%20Chakravorty-blue?style=plastic\u0026logo=Linkedin\u0026logoColor=white\u0026link=https://www.linkedin.com/in/shivanjan/)](https://www.linkedin.com/in/shivanjan/) [![Gmail Badge](https://img.shields.io/badge/-schakravorty846-c14438?style=plastic\u0026logo=Gmail\u0026logoColor=white\u0026link=mailto:schakravorty846@gmail.com)](mailto:schakravorty846@gmail.com) [![Github Badge](https://img.shields.io/github/followers/Glitchfix?label=Glitchfix\u0026logo=github\u0026style=plastic)](https://github.com/Glitchfix)\n\n\n## flask-faas\n\nMigrating from serverless to a server application can be a headache at times.\nflask-faas provides you a layer that sits on top of your existing serverless application handlers and helps them convert to Flask routes.\nThe prime goal is to be easy to use and easier to port. We currently support [Google Cloud Function](https://cloud.google.com/functions/), [AWS Lambda](https://aws.amazon.com/lambda/) and [OpenFaaS](https://www.openfaas.com/). We would have Azure Functions on the roadmap shortly.\n\n## Installation\n\n```py\npip install flask-faas\n```\n\n## Just import and use, no extra hassle!\n\n```py\nfrom flask_faas.gcp import google_cloud_function\nfrom flask_faas.aws import aws_lambda\nfrom flask import Flask, jsonify\n\napp = Flask(__name__)\n\n@app.route(\"/gcp/\u003carg0\u003e\",methods=[\"GET\"])\n@google_cloud_function\ndef my_cloud_function_handler(req):\n    return jsonify(req.view_args)\n\n@app.route(\"/aws/\u003carg0\u003e/\u003carg1\u003e\",methods=[\"GET\"])\n@aws_lambda\ndef my_lambda_handler(event, context):\n    return jsonify([event[\"pathParameters\"]])\n\nif __name__ == '__main__':\n    app.run()\n```\n\n### Supported FaaS handler\n\n- [x] Google Cloud Function\n- [x] AWS Lambda\n- [x] OpenFaaS\n\n### TODO\n- [ ] Azure Function\n\n\n##### Resources: \n[Flask](https://flask.palletsprojects.com/)\n[Google Cloud Function](https://cloud.google.com/functions/)\n[AWS Lambda](https://aws.amazon.com/lambda/)\n[OpenFaaS](https://www.openfaas.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglitchfix%2Fflask-faas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglitchfix%2Fflask-faas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglitchfix%2Fflask-faas/lists"}