fastapi-serverless-terraform-starter
所属分类:FaaS/Serverless
开发工具:HCL
文件大小:0KB
下载次数:0
上传日期:2024-03-12 15:31:57
上 传 者:
sh-1993
说明: FastAPI无服务器启动器(带Terraform Infra)
(FastAPI Serverless Starter (with Terraform Infra))
文件列表:
fastapi_serverless_terraform_starter/
infra/
tests/
.pre-commit-config.yaml
.tool-versions
Makefile
create_layer.sh
poetry.lock
pyproject.toml
ruff.toml
# FastAPI Serverless Starter
## Pre-requisites
- Python 3.12.2
- Poetry 1.8.2
- Terraform
## Tools and Frameworks
- [x] FastApi
- [x] Uvicorn
- [x] pytest
- [x] pre-commit
- [x] ruff
## Install dependencies
```
poetry install
```
## Terraform state (S3)
- Create S3 Bucket: fastapi-tf-starter-tfstate
- Create DynamoDB Table: fastapi-tf-starter-tf-lockid (PK: LockID)
## Install pre-commit hooks
```
pre-commit install
```
## Terraform commands
Create infrastructure
```
make terraform-create
```
Destroy infrastructure
```
make terraform-destroy
```
Format terraform files
```
make terraform-format
```
## Commands
Start local server
```
make start-local
```
Lint
```
make lint
```
Lint and fix
```
make lint-fix
```
Format
```
make format
```
Launch tests
```
make test
```
Launch test with coverage
```
make coverage
```
Run pre-commit hooks
```
make pre-commit
```
近期下载者:
相关文件:
收藏者: