Skip to content

choisun0924/fast-api-example-from-sun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast-api-example-from-sun

fast api example

안녕하세요 최선입니다. 요즘 fastapi의 관심이 많아지고 있더라구요. 쉽게 사용하시길 바랍니다.

일단. Fast API를 사용하기 위해서 패키지를 설치해주세요.

  1. pip install fastapi

image

파이썬 실행시 서버 구동을 위해 uvicorn을 설치 해줍니다.

  1. pip install uvicorn

image

FastAPI Class를 testServer라는 이름으로 생성 해줍니다.

  1. testServer = FastAPI()

image

@testServer.get("/url") 방식으로 get을 쉽게 구현 가능

image

  1. 실행문을 작성해줍니다.

image

정말 간단하게 완성된 코드

image

Fast API의 장점은 /docs에 사용법이 자동으로 만들어집니다

image

About

fast api example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages