{"id":20280333,"url":"https://github.com/yezz123/asgi-aws","last_synced_at":"2025-08-20T12:30:50.683Z","repository":{"id":47512258,"uuid":"516166422","full_name":"yezz123/asgi-aws","owner":"yezz123","description":"Build API with ASGI in AWS Lambda with API Gateway HTTP API or REST API, or with Function URL ✨","archived":false,"fork":false,"pushed_at":"2024-12-01T05:28:30.000Z","size":169,"stargazers_count":27,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-08T15:23:02.621Z","etag":null,"topics":["api","api-gateway","asgi","aws","fastapi","lambda","pydantic","rest-api","typing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/asgi_aws","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/yezz123.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-20T23:49:06.000Z","updated_at":"2024-10-13T17:33:11.000Z","dependencies_parsed_at":"2023-01-22T16:15:14.059Z","dependency_job_id":"7eabcfc2-a61d-4850-9179-f2f9f4a5c037","html_url":"https://github.com/yezz123/asgi-aws","commit_stats":{"total_commits":50,"total_committers":4,"mean_commits":12.5,"dds":0.36,"last_synced_commit":"b9e1db900c247925395285d8618e20906a524366"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Fasgi-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Fasgi-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Fasgi-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Fasgi-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yezz123","download_url":"https://codeload.github.com/yezz123/asgi-aws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423559,"owners_count":18223435,"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":["api","api-gateway","asgi","aws","fastapi","lambda","pydantic","rest-api","typing"],"created_at":"2024-11-14T13:35:20.509Z","updated_at":"2024-12-19T11:11:18.261Z","avatar_url":"https://github.com/yezz123.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asgi-aws\n\n![logo](https://raw.githubusercontent.com/yezz123/asgi-aws/main/.github/logo.png)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/yezz123/asgi-aws/actions/workflows/test.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/yezz123/asgi-aws/actions/workflows/test.yml/badge.svg\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/yezz123/asgi-aws/actions/workflows/lint.yml\"\u003e\n    \u003cimg src=\"https://github.com/yezz123/asgi-aws/actions/workflows/lint.yml/badge.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/yezz123/asgi-aws\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/yezz123/asgi-aws/branch/main/graph/badge.svg?token=MTG51U77R2\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/yezz123/asgi-aws/actions/workflows/lint.yml\"\u003e\n    \u003cimg src=\"https://github.com/yezz123/asgi-aws/actions/workflows/lint.yml/badge.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/asgi_aws\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/asgi_aws.svg?color=%2334D058\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nBuild API with ASGI in AWS Lambda with API Gateway HTTP API or REST API, or with Function URL ✨\n\n## Installation\n\n```sh\npip install asgi_aws\n```\n\n## Example\n\n- Create a file `main.py` with:\n\n```python\nfrom asgi_aws import Asgi\nfrom typing import Optional\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"/\")\ndef read_root():\n    return {\"Hello\": \"World\"}\n\n@app.get(\"/items/{item_id}\")\ndef read_item(item_id: int, q: Optional[str] = None):\n    return {\"item_id\": item_id, \"q\": q}\n\nentry_point = Asgi.entry_point(app)\n```\n\n## Deploy it\n\n- Let's create for example a yaml file with the following content:\n\n```yaml\nAWSTemplateFormatVersion: \"2010-09-09\"\nTransform: AWS::Serverless-2016-10-31\n\nResources:\n  ExFunctionUrlAPI:\n    Type: AWS::Serverless::Function\n    Properties:\n      Runtime: python3.10\n      CodeUri: src/\n      Handler: main.entry_point\n      MemorySize: 256\n      Timeout: 30\n      FunctionUrlConfig:\n        AuthType: NONE\n```\n\n- Now, we can deploy the function with the following command:\n\n```sh\n# deploy HTTP API\nsam build -t api.yaml --use-container\nsam run deploy\n```\n\n**Note:** You can also deploy the function under Deployment for Rest API or with\na Function URL.\n\n## Development 🚧\n\n### Setup environment 📦\n\nYou should create a virtual environment and activate it:\n\n```bash\npython -m venv venv/\n```\n\n```bash\nsource venv/bin/activate\n```\n\nAnd then install the development dependencies:\n\n```bash\n# Install dependencies\npip install -e .[test,lint]\n```\n\n### Run tests 🌝\n\nYou can run all the tests with:\n\n```bash\nbash scripts/test.sh\n```\n\n### Format the code 🍂\n\nExecute the following command to apply `pre-commit` formatting:\n\n```bash\nbash scripts/format.sh\n```\n\nExecute the following command to apply `mypy` type checking:\n\n```bash\nbash scripts/lint.sh\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezz123%2Fasgi-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyezz123%2Fasgi-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezz123%2Fasgi-aws/lists"}