The example of Python application with the usage of Serverless
The set of all needed environment variables is placed in .example.env
file.
Set the variables in your environment manually or create your own .env
file with all the variables inside to work with the application without any errors.
Run to install all npm
dependency packages:
$ npm install
Run to install all Python
dependency packages:
$ pip install poetry
$ poetry install
Run to emulate API Gateway
for processing the calls of AWS λ
functions locally:
$ npm run offline-start
Run to deploy the service into the Amazon Web Services:
$ npm run deploy -- --stage STAGE_NAME
Run to migrate the changes into the database:
$ alembic revision --autogenerate -m "MIGRATION_DESCRIPTION"
$ npm run migrate -- local # use "local" argument for local database
Run to check the correctness of the code:
$ flake8
$ mypy .
$ pytest
Run to format the code:
$ black .