{"id":33193813,"url":"https://github.com/hmngwy/mutton","last_synced_at":"2025-12-14T16:51:11.835Z","repository":{"id":47283165,"uuid":"150195899","full_name":"hmngwy/mutton","owner":"hmngwy","description":"Better AWS Lambda Handlers in Python","archived":false,"fork":false,"pushed_at":"2022-12-08T03:00:47.000Z","size":92,"stargazers_count":16,"open_issues_count":8,"forks_count":4,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-11-16T17:05:08.949Z","etag":null,"topics":["aws","aws-lambda","handler","python","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmngwy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-25T02:23:28.000Z","updated_at":"2022-09-08T11:30:41.000Z","dependencies_parsed_at":"2023-01-25T03:45:12.154Z","dependency_job_id":null,"html_url":"https://github.com/hmngwy/mutton","commit_stats":null,"previous_names":["hmngwy/py-aws-lambda-handler"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hmngwy/mutton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmngwy%2Fmutton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmngwy%2Fmutton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmngwy%2Fmutton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmngwy%2Fmutton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmngwy","download_url":"https://codeload.github.com/hmngwy/mutton/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmngwy%2Fmutton/sbom","scorecard":{"id":466765,"data":{"date":"2025-08-11","repo":{"name":"github.com/hmngwy/mutton","commit":"21c00f245fbf7e7c77fc30780a095b4aad36a832"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"31 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2020-28 / GHSA-m6xf-fq7q-8743","Warn: Project is vulnerable to: PYSEC-2020-27 / GHSA-q65m-pv3f-wr5r","Warn: Project is vulnerable to: PYSEC-2020-340 / GHSA-vqhp-cxgc-6wmm","Warn: Project is vulnerable to: PYSEC-2021-865 / GHSA-vv2x-vrpj-qqpq","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2022-42991 / GHSA-v3c5-jqr6-7qm8","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2021-140 / GHSA-9w8r-397f-prfh","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: PYSEC-2021-141 / GHSA-pq64-v7f5-gqh8","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: PYSEC-2019-130","Warn: Project is vulnerable to: PYSEC-2019-131","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: PYSEC-2023-207 / GHSA-gwvm-45gx-3cf8","Warn: Project is vulnerable to: PYSEC-2019-133 / GHSA-mh33-7rrq-662w","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2019-132 / GHSA-r64q-w8jr-g9qp","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2021-108"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T12:44:28.048Z","repository_id":47283165,"created_at":"2025-08-19T12:44:28.049Z","updated_at":"2025-08-19T12:44:28.049Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27731762,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","handler","python","serverless"],"created_at":"2025-11-16T07:00:34.695Z","updated_at":"2025-12-14T16:51:11.816Z","avatar_url":"https://github.com/hmngwy.png","language":"Python","funding_links":[],"categories":["Others","Related projects"],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/hmngwy/mutton.svg?style=svg)](https://circleci.com/gh/hmngwy/mutton) [![codecov](https://codecov.io/gh/hmngwy/mutton/branch/develop/graph/badge.svg)](https://codecov.io/gh/hmngwy/mutton)\n\n![](https://codecov.io/gh/hmngwy/mutton/branch/develop/graphs/tree.svg?height=70\u0026width=898)\n\n## mutton\n\nBetter Python 3 AWS Lambda Handlers.\n\nCurrently, your only choice for making Python handlers for AWS Lambda is to create a function like so:\n\n```\ndef handler(event, context):\n    return True\n```\n\nThis isn't ideal when you start dealing with more than one handler, or if you want to provide a configurable and reusable handler. This package provides three base classes, the `Handler`, the `Request`, and the `Response` handler.\n\nThe `Handler` class is a [callable](https://en.wikipedia.org/wiki/Callable_object), you create a subclass off of this, instantiate it, and that's what you configure AWSλ to invoke.\n\nYour `Handler` has to have a `perform(self, request)` method, this houses your handler's business logic, `Handler.__call__` executes this function and expects a `Response` object.\n\nThe `Response` object behaves like a dictionary and an object, an attribute called `serialized` is returned to AWSλ.\n\nThe `request` argument in `perform(self, request)` is a `Request` object, and it houses the `event` and `context` parameters that AWSλ passes to your handler. Packaging those handler arguments into an object makes them available for transparent mutations, see [`mutton.apig.APIGatewayRequest`](mutton/mutton/apig/\\_\\_init\\_\\_.py) for reference.\n\nThe foundation of this library is tiny, I recommend reviewing the [main classes](mutton/mutton/__init__.py) to further understand how to use this package.\n\n### Usage\n\n```\npip install mutton\n```\n\n```python\nimport mutton\n\nclass EchoHandler(mutton.Handler):\n    \"\"\"Echo handler.\"\"\"\n\n    def perform(self, request, **k):\n        \"\"\"Echo perform method.\"\"\"\n        response = mutton.Response()\n        response.body = self.request.event\n        return response\n\necho_handler = EchoHandler()\n\n# `echo_handler` is now a callable function you can map your AWS Lambda function to\n```\n\n### Develop\n\nFork this library and send over PRs, I will consider applications for contributors if two of your PRs gets merged and published.\n\n```\npipenv sync --dev # setup\npipenv run pytest # test\n```\n\n### Supported Event Sources\n\n- [x] API Gateway `mutton.apig`\n- [ ] S3\n- [ ] DynamoDB\n- [ ] SNS\n- [ ] SES\n- [ ] SQS\n- [ ] Cognito\n- [ ] Cloudwatch Logs, Events\n\n#### Help\n\nWe want support for more event sources, I am willing to entertain PRs. You can use the `mutton.apig` submodule as an example of implementing more event sources.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmngwy%2Fmutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmngwy%2Fmutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmngwy%2Fmutton/lists"}