{"id":19989078,"url":"https://github.com/icemap/example-python-http-api","last_synced_at":"2026-04-19T15:31:55.339Z","repository":{"id":119432603,"uuid":"585514632","full_name":"Icemap/example-python-http-api","owner":"Icemap","description":"example of python HTTP API for the serverless framework.","archived":false,"fork":false,"pushed_at":"2023-01-05T11:32:45.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T21:42:57.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Icemap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-05T11:15:54.000Z","updated_at":"2023-01-05T11:16:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bd838c1-1495-421c-b0a6-eb1a95062944","html_url":"https://github.com/Icemap/example-python-http-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Icemap/example-python-http-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Fexample-python-http-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Fexample-python-http-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Fexample-python-http-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Fexample-python-http-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icemap","download_url":"https://codeload.github.com/Icemap/example-python-http-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Fexample-python-http-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32011959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":[],"created_at":"2024-11-13T04:45:21.554Z","updated_at":"2026-04-19T15:31:55.318Z","avatar_url":"https://github.com/Icemap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\ntitle: 'AWS Simple HTTP Endpoint example in Python'\ndescription: 'This template demonstrates how to make a simple REST API with Python running on AWS Lambda and API Gateway using the traditional Serverless Framework.'\nlayout: Doc\nframework: v2\nplatform: AWS\nlanguage: python\npriority: 2\nauthorLink: 'https://github.com/serverless'\nauthorName: 'Serverless, inc.'\nauthorAvatar: 'https://avatars1.githubusercontent.com/u/13742415?s=200\u0026v=4'\n--\u003e\n\nThis template demonstrates how to make a simple REST API with Python running on AWS Lambda and API Gateway using the traditional Serverless Framework.\n\n# Serverless Framework Python REST API on AWS\n\nThis template demonstrates how to make a simple REST API with Python running on AWS Lambda and API Gateway using the traditional Serverless Framework.\n\nThis template does not include any kind of persistence (database). For a more advanced examples check out the [examples repo](https://github.com/serverless/examples/) which includes DynamoDB, Mongo, Fauna and other examples.\n\n## Usage\n\n### Deployment\n\nThis example is made to work with the Serverless Framework dashboard which includes advanced features like CI/CD, monitoring, metrics, etc.\n\n```\n$ serverless login\n$ serverless deploy\n```\n\nTo deploy without the dashboard you will need to remove `org` and `app` fields from the `serverless.yml`, and you won’t have to run `sls login` before deploying.\n\nAfter running deploy, you should see output similar to:\n\n```bash\nServerless: Packaging service...\nServerless: Excluding development dependencies...\nServerless: Creating Stack...\nServerless: Checking Stack create progress...\n........\nServerless: Stack create finished...\nServerless: Uploading CloudFormation file to S3...\nServerless: Uploading artifacts...\nServerless: Uploading service aws-python-rest-api.zip file to S3 (711.23 KB)...\nServerless: Validating template...\nServerless: Updating Stack...\nServerless: Checking Stack update progress...\n.................................\nServerless: Stack update finished...\nService Information\nservice: aws-python-rest-api\nstage: dev\nregion: us-east-1\nstack: aws-python-rest-api-dev\nresources: 12\napi keys:\n  None\nendpoints:\n  ANY - https://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev/\nfunctions:\n  api: aws-python-rest-api-dev-hello\nlayers:\n  None\n```\n\n_Note_: In current form, after deployment, your API is public and can be invoked by anyone. For production deployments, you might want to configure an authorizer. For details on how to do that, refer to [http event docs](https://www.serverless.com/framework/docs/providers/aws/events/apigateway/).\n\n### Invocation\n\nAfter successful deployment, you can call the created application via HTTP:\n\n```bash\ncurl https://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev/\n```\n\nWhich should result in response similar to the following (removed `input` content for brevity):\n\n```json\n{\n  \"message\": \"Go Serverless v2.0! Your function executed successfully!\",\n  \"input\": {\n    ...\n  }\n}\n```\n\n### Local development\n\nYou can invoke your function locally by using the following command:\n\n```bash\nserverless invoke local --function hello\n```\n\nWhich should result in response similar to the following:\n\n```\n{\n  \"statusCode\": 200,\n  \"body\": \"{\\n  \\\"message\\\": \\\"Go Serverless v2.0! Your function executed successfully!\\\",\\n  \\\"input\\\": \\\"\\\"\\n}\"\n}\n```\n\nAlternatively, it is also possible to emulate API Gateway and Lambda locally by using `serverless-offline` plugin. In order to do that, execute the following command:\n\n```bash\nserverless plugin install -n serverless-offline\n```\n\nIt will add the `serverless-offline` plugin to `devDependencies` in `package.json` file as well as will add it to `plugins` in `serverless.yml`.\n\nAfter installation, you can start local emulation with:\n\n```\nserverless offline\n```\n\nTo learn more about the capabilities of `serverless-offline`, please refer to its [GitHub repository](https://github.com/dherault/serverless-offline).\n\n### Bundling dependencies\n\nIn case you would like to include 3rd party dependencies, you will need to use a plugin called `serverless-python-requirements`. You can set it up by running the following command:\n\n```bash\nserverless plugin install -n serverless-python-requirements\n```\n\nRunning the above will automatically add `serverless-python-requirements` to `plugins` section in your `serverless.yml` file and add it as a `devDependency` to `package.json` file. The `package.json` file will be automatically created if it doesn't exist beforehand. Now you will be able to add your dependencies to `requirements.txt` file (`Pipfile` and `pyproject.toml` is also supported but requires additional configuration) and they will be automatically injected to Lambda package during build process. For more details about the plugin's configuration, please refer to [official documentation](https://github.com/UnitedIncome/serverless-python-requirements).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Fexample-python-http-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficemap%2Fexample-python-http-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Fexample-python-http-api/lists"}