Serverless Framework Python3.11 Template Repository.
- nodenv
- pyenv
- wsl2 Ubuntu
- Docker
ここら辺参考になるかも
- https://qiita.com/kkml_4220/items/9daf2117e515e5342bac
- https://qiita.com/kkml_4220/items/1b239b3aabfabc6f5586
pyenv
を使ってPython
のバージョン合わせる場合はこちらの記事を参考にPython 3.11.6
を使用してください。
# install poetry
pip install poetry
# Poetry to use project-specific virtual env
poetry config virtualenvs.in-project true
# install virtual env
poetry install
# install npm dependencies
npm install
# format
poetry run task format
# lint
poetry run task lint
# pytest
poetry run task test
# run local api server (use .vnev interpreter)
npm run dev
Swagger URL: http://localhost:3333/local/v1/swagger
health check 用エンドポイント: http://localhost:3333/local/v1/healthcheck
# activate python venv shell
poetry shell
# run local api server (serverless offline)
npm run dev