• This project
    • Loading...
  • Sign in

2021-1-capstone-design2 / 2015104174

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • 2015104174
  • codes
  • fastapi-temp
  • main.py
  • 박기홍's avatar
    최종보고서 업로드 · a4bf1787
    a4bf1787
    박기홍 authored 2021-06-14 08:43:29 +0900
main.py 310 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from typing import Optional
from fastapi import FastAPI

import datetime

app = FastAPI()

@app.get("/")
async def plainText():
    return {"hi"}

@app.get("/time")
async def read_time():
    now = datetime.datetime.now()
    return {now}

@app.get("/query/")
async def read_query(id: int = 0):
    return {id}