Weitere ähnliche Inhalte
Ähnlich wie FastAPIのテンプレートプロジェクトがいい感じだった話 (20)
Mehr von NipponAlgorithm (7)
Kürzlich hochgeladen (10)
FastAPIのテンプレートプロジェクトがいい感じだった話
- 3. 雰囲気
from fastapi import FastAPI
app = FastAPI()
@app.get("/hello")
def hello():
return {"message": "Hello World"}
- 5. テンプレートの使い方
$ pip install cookiecutter
$ cookiecutter https://github.com/tiangolo/full-stack-fastapi-postgresql
● cookiecutterコマンドで生成
- 7. テンプレートの生成
● 色々聞かれるので答えていく
$ cookiecutter https://github.com/tiangolo/full-stack-fastapi-postgresql
project_name [Base Project]: FastAPI Sample
project_slug [fastapi-sample]:
domain_main [fastapi-sample.com]:
domain_staging [stag.fastapi-sample.com]:
docker_swarm_stack_name_main [fastapi-sample-com]:
docker_swarm_stack_name_staging [stag-fastapi-sample-com]:
secret_key [changethis]:
first_superuser [admin@fastapi_sample.com]:
first_superuser_password [changethis]: