{"id":13449309,"url":"https://github.com/sloev/python-lambdarest","last_synced_at":"2025-04-09T15:04:19.612Z","repository":{"id":40295548,"uuid":"81223332","full_name":"sloev/python-lambdarest","owner":"sloev","description":"Flask like web framework for AWS Lambda","archived":false,"fork":false,"pushed_at":"2023-03-08T21:03:10.000Z","size":1506,"stargazers_count":94,"open_issues_count":1,"forks_count":23,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-09T15:02:37.844Z","etag":null,"topics":["aws","aws-lambda","balancer","framework","json-schema","lambda","pypi","python","routing","werkzeug"],"latest_commit_sha":null,"homepage":"https://sloev.github.io/python-lambdarest/","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/sloev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["sloev"],"custom":["https://www.buymeacoffee.com/sloev"]}},"created_at":"2017-02-07T15:30:04.000Z","updated_at":"2025-02-11T08:06:20.000Z","dependencies_parsed_at":"2024-01-18T17:08:42.896Z","dependency_job_id":null,"html_url":"https://github.com/sloev/python-lambdarest","commit_stats":{"total_commits":153,"total_committers":23,"mean_commits":"6.6521739130434785","dds":0.5359477124183006,"last_synced_commit":"f03ad2fa821ca405ec7156170693e8396090d4f5"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fpython-lambdarest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fpython-lambdarest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fpython-lambdarest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fpython-lambdarest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloev","download_url":"https://codeload.github.com/sloev/python-lambdarest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055275,"owners_count":21040156,"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","balancer","framework","json-schema","lambda","pypi","python","routing","werkzeug"],"created_at":"2024-07-31T06:00:35.327Z","updated_at":"2025-04-09T15:04:19.574Z","avatar_url":"https://github.com/sloev.png","language":"Python","readme":"![test](https://github.com/sloev/python-lambdarest/actions/workflows/test.yml/badge.svg) [![Latest Version](https://img.shields.io/pypi/v/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) [![Python Support](https://img.shields.io/pypi/pyversions/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) \n\n\n# lambdarest  \u003ca href=\"https://www.buymeacoffee.com/sloev\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-pink.png\" alt=\"Buy Me A Coffee\" height=\"51px\" width=\"217px\"\u003e\u003c/a\u003e\n\nPython routing mini-framework for [AWS Lambda](https://aws.amazon.com/lambda/) with optional JSON-schema validation.\n\n### Features\n\n* `lambda_handler` function constructor with built-in dispatcher\n* Decorator to register functions to handle HTTP methods\n* Optional JSON-schema input validation using same decorator\n\n### Merchandise ❤️\n\nYou can support the development by [buying a wonderful cup](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) or [buy coffee for the maintainers cup](https://buymeacoffee.com/sloev)\n\n[![lambdarest mug](https://raw.githubusercontent.com/sloev/python-lambdarest/master/.github/lambdarest_mug.jpg)](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD)\n\n### External articles / tutorials\n\n* [devgrok.com: Create a Private Microservice Using an Application Load Balancer](http://www.devgrok.com/2019/03/create-private-microservice-using.html)\n\n  Article about how to use **lambdarest** with **AWS Application Load Balancer**\n\n* [rockset.com: Building a Serverless Microservice Using Rockset and AWS Lambda](https://rockset.com/blog/building-a-serverless-microservice-using-rockset-and-aws-lambda/)\n\n  Article about how to set up **lambdarest** in AWS infrastructure\n\n**Other articles? add them [here](https://github.com/trustpilot/python-lambdarest/issues/55)**\n\n## Installation\n\nInstall the package from [PyPI](http://pypi.python.org/pypi/) using [pip](https://pip.pypa.io/):\n\n```bash\n$ pip install lambdarest\n```\n\n## Getting Started\n\nThis module helps you to handle different HTTP methods in your AWS Lambda.\n\n```python\nfrom lambdarest import lambda_handler\n\n@lambda_handler.handle(\"get\")\ndef my_own_get(event):\n    return {\"this\": \"will be json dumped\"}\n\n##### TEST #####\n\ninput_event = {\n    \"body\": '{}',\n    \"httpMethod\": \"GET\",\n    \"resource\": \"/\"\n}\nresult = lambda_handler(event=input_event)\nassert result == {\"body\": '{\"this\": \"will be json dumped\"}', \"statusCode\": 200, \"headers\":{}}\n```\n\n## Documentation\n\nSee [docs](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md) for **documentation and examples** covering amongst:\n\n* [Advanced usage example](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#advanced-usage)\n* [Query params](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#query-params)\n* [Headers and MultiValueHeaders](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#headers-and-multivalueheaders)\n* [Routing](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#routing)\n* [Authorization Scopes](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#authorization-scopes)\n* [Exception Handling](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#exception-handling)\n* [AWS Application Load Balancer](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#aws-application-load-balancer)\n* [CORS](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#cors)\n\n\n## Anormal unittest behaviour with `lambda_handler` singleton\n\nBecause of python unittests leaky test-cases it seems like you shall beware of [this issue](https://github.com/trustpilot/python-lambdarest/issues/16) when using the singleton `lambda_handler` in a multiple test-case scenario.\n\n## Tests\n\nUse the following commands to install requirements and run test-suite:\n\n```bash\n$ pip install -e \".[dev]\"\n$ black tests/ lambdarest/\n$ rm -f test_readme.py\n$ pytest --doctest-modules -vvv\n```\n\nFor more info see [Contributing...](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md)\n\n## Changelog\n\nSee [HISTORY.md](https://github.com/trustpilot/python-lambdarest/blob/master/docs/HISTORY.md)\n\n## Contributors\n\nThanks for contributing!\n\n[@sphaugh](https://github.com/sphaugh), [@amacks](https://github.com/amacks), [@jacksgt](https://github.com/jacksgt), [@mkreg](https://github.com/mkreg), [@aphexer](https://github.com/aphexer), [@nabrosimoff](https://github.com/nabrosimoff), [@elviejokike](https://github.com/elviejokike), [@eduardomourar](https://github.com/eduardomourar), [@devgrok](https://github.com/devgrok), [@AlbertoTrindade](https://github.com/AlbertoTrindade), [@paddie](https://github.com/paddie), [@svdgraaf](https://github.com/svdgraaf), [@simongarnier](https://github.com/simongarnier), [@martinbuberl](https://github.com/martinbuberl), [@adamelmore](https://github.com/adamelmore), [@sloev](https://github.com/sloev)\n\n[Wanna contribute?](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md)\n\nAnd by the way, we have a [Code Of Friendlyhood!](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CODE_OF_CONDUCT.md)\n\n\n## FAQ\n\n* Where is all the old versions?\n  they are gone see more here: https://github.com/sloev/python-lambdarest/issues/94\n* What can i do to get the attention of the maintainer? see more here: https://github.com/sloev/python-lambdarest#merchandise\n","funding_links":["https://github.com/sponsors/sloev","https://www.buymeacoffee.com/sloev","https://buymeacoffee.com/sloev"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fpython-lambdarest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloev%2Fpython-lambdarest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fpython-lambdarest/lists"}