Skip to content

Ep08 : Flask-RESTful 로 Car CRUD api 구축하기 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TGoddessana opened this issue Jul 15, 2022 · 7 comments
Open

Ep08 : Flask-RESTful 로 Car CRUD api 구축하기 #9

TGoddessana opened this issue Jul 15, 2022 · 7 comments

Comments

@TGoddessana
Copy link
Collaborator

TGoddessana commented Jul 15, 2022

Ep08부터는 flask-restful 라이브러리를 활용하여 HTTP API 를 구축하는 방법에 대해 다룹니다.

이번 에피소드를 마치고 나면, cars/ 와 car/ 두 개의 엔드포인트로 자동차에 대한 목록 조회, 상세 조회, 생성, 수정, 삭제를 할 수 있는 API 서버를 구축할 수 있을 것입니다.

(과제) Flask 의 pluggable view 에 대한 설명을 블로그에 간략하게 정리해 주세요.

- https://flask-docs-kr.readthedocs.io/ko/latest/views.html

(과제) 아래의 조건을 만족하는 API를 구축하고, 이를 현재 레포의 브랜치에 업로드해 주세요.

- 브랜치는 https://github.com/IDU-IFP/ifp-flask-study/tree/<본인 깃허브 닉네임> 에 업로드해 주시면 됩니다!
- "animal" 은 "이름", "나이" 의 정보를 가집니다. 아래는 예시입니다.
    - { "name" : "톱가오리", "age" : " 3" }
- GET /animals
    - 모든 동물에 대한 목록 조회
- GET /animal/<name>
    - 이름으로 고유하게 식별되는 특정 동물 "한 마리"의 상세정보를 반환, 동물들은 같은 이름을 가질 수 없음
- POST /animal/<name>
    -  <name> 이라는 이름을 가지는 동물 한 마리를 생성, 같은 이름을 가지고 있는 동물이 있다면 생성은 실패해야 함
- PUT /animal/<name>
    -  <name> 이라는 이름을 가지고 있는 동물 한 마리를 생성하거나, 이미 그 이름을 가지고 있는 동물이 존재한다면 정보를 수정
- DELETE /animal/<name>
    - <name> 이라는 이름을 가지고 있는 동물 한 마리를 죽임

참고 자료

https://gdsanadev.com/14924 - 생성 / 조회 API 구현
https://gdsanadev.com/15064 - 수정 / 삭제 API 구현
https://flask-docs-kr.readthedocs.io/ko/latest/views.html - pluggable view 공식 문서
https://flask-restful.readthedocs.io/en/latest/ - flask-restful 공식 문서

@TGoddessana TGoddessana changed the title Ep08 : Flask-RESTful 로 REST API 구축하기 Ep08 : Flask-RESTful 로 Car 생성, 조회 api 구축하기 Aug 6, 2022
@TGoddessana TGoddessana changed the title Ep08 : Flask-RESTful 로 Car 생성, 조회 api 구축하기 Ep08 : Flask-RESTful 로 Car 생성, 조회, 목록 api 구축하기 Aug 6, 2022
@TGoddessana TGoddessana changed the title Ep08 : Flask-RESTful 로 Car 생성, 조회, 목록 api 구축하기 Ep08 : Flask-RESTful 로 Car CRUD api 구축하기 Aug 25, 2022
@overtae
Copy link
Member

overtae commented Aug 30, 2022

@leesunuk
Copy link
Member

@2gang
Copy link

2gang commented Aug 31, 2022

@ryukyung
Copy link
Member

@ji1210h
Copy link
Member

ji1210h commented Sep 1, 2022

@youngjoo00
Copy link
Member

@hyoeunla
Copy link
Member

hyoeunla commented Sep 1, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants