{"id":20540664,"url":"https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python","last_synced_at":"2025-04-14T08:40:14.708Z","repository":{"id":40836176,"uuid":"261731771","full_name":"serverless-operations/serverless-enterprise-application-boilerplate-for-python","owner":"serverless-operations","description":"A boilerplate to build an AWS serverless enterprise application for Python","archived":false,"fork":false,"pushed_at":"2023-03-04T16:31:57.000Z","size":1160,"stargazers_count":26,"open_issues_count":17,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T22:11:15.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/serverless-operations.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}},"created_at":"2020-05-06T10:58:59.000Z","updated_at":"2024-05-02T16:07:37.000Z","dependencies_parsed_at":"2023-02-13T12:00:39.369Z","dependency_job_id":null,"html_url":"https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-operations%2Fserverless-enterprise-application-boilerplate-for-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-operations%2Fserverless-enterprise-application-boilerplate-for-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-operations%2Fserverless-enterprise-application-boilerplate-for-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-operations%2Fserverless-enterprise-application-boilerplate-for-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-operations","download_url":"https://codeload.github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848494,"owners_count":21171387,"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":[],"created_at":"2024-11-16T01:17:00.088Z","updated_at":"2025-04-14T08:40:14.673Z","avatar_url":"https://github.com/serverless-operations.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)  [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) \n\n# Serverless Enterprise Application Boilerplate For Python\nThis is a boilerplate to build an AWS serverless enterprise application. In general, a serverless application is composed of some CloudFormation stacks. This repository shows you all the things which build that like how to separate each stack and build a directory structure using Serverless Framework, Python, and CircleCI.\n\n## Deploy image\nDeploy this app to AWS using Serverless Framework via CircleCI.\n\n\u003cimg src=\"https://raw.githubusercontent.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/master/service.png\" alt=\"Architecture\" width=\"50%;\"\u003e\n\n## Directory Structure\n\n| Directory | Description |\n|:---|:---|\n|layer |Lambda layers. Put Python external libraries and common libraries that can use each service. |\n|lib |Common libraries that can use each service. |\n|services/api |API Service which a part of this application. Here is [the architecture](https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/tree/master/services/api) |\n|services/workflow |API Service which a part of this application. Here is [the architecture](https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/tree/master/services/workflow-service) |\n|services/message-service |Message Service which a part of this application. Here is [the architecture](https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/tree/master/services/message-service) |\n|services/stream-service |Stream Service which a part of this application. Here is [the architecture](https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/tree/master/services/stream-service) |\n|tests/unit_tests |Put unit tests. |\n|tests/integration_tests |Put E2E tests. |\n\n## Commands\n\nAll commands you need to build this application is defined as yarn script.\nHere is a part of that.\n| Command | Description |\n|:---|:---|\n| yarn lint | Run lint with flake8. |\n| yarn test:unit | Run unit testing. |\n| yarn test:workflow | Run E2E testing for workflow service. |\n| yarn deploy:workflow | Deploy workflow service. |\n| yarn deploy:db | Deploy tables. |\n\nAll commands are defined in [package.json](https://github.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/blob/master/package.json). See that.\n\n## Setup\n\nYou can use this boilerplate as a skeleton to build your serverless application. First, check out the code and remove `.git` directory so that you can put it in your repository.\n\n```\n$ git clone git@github.com:serverless-operations/serverless-enterprise-application-boilerplate-for-python.git\n$ cd serverless-enterprise-application-boilerplate-for-python\n$ rm -rf .git\n$ yarn install\n```\n\nSetup needed environment valiables  via `direnv`.\n```\n$ cp -pr .envrc.sample .envrc\n$ vi .envrc # edit\n\n# allow\n$ direnv allow\n```\n\nInstall Python external libraries to develop into `venv`.\n```\n$ python3 -m venv venv\n$ . venv/bin/activate\n$ pip3 install -r requirements-dev.txt\n```\n\nCreate a deployment S3 bucket to your AWS account with following schema. There valiables are defined in `serverless-common.yml`\n```\n\u003cappname\u003e.\u003cdeploymentBucketPath(stage)\u003e.\u003cregion\u003e.deploys\n```\n\n\nRun deploy API to see this setup successfully.\n```\n$ yarn deploy:api\n```\n\n## AWS Account\n\nThis boilerplate supposes to use two AWS accounts, which are for production and other than that.\nYou can switch AWS accounts to deploy using the CircleCI context feature.\n\n\u003cimg src=\"https://raw.githubusercontent.com/serverless-operations/serverless-enterprise-application-boilerplate-for-python/master/accounts.png\" alt=\"Accounts\" width=\"50%;\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-operations%2Fserverless-enterprise-application-boilerplate-for-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-operations%2Fserverless-enterprise-application-boilerplate-for-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-operations%2Fserverless-enterprise-application-boilerplate-for-python/lists"}