프레임워크/FastAPI 25

[FastAPI] FastAPI [15] Response model 2 - Other Return Type Annotations

https://fastapi.tiangolo.com/ko/tutorial/response-model/ Response Model - Return Type - FastAPI Response Model - Return Type Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing. You can declare the type used for the response by annotating the path operation function return type. Y fastapi.tiangolo.com 0. Other Return Type Ann..

[FastAPI] FastAPI [13] Response status code

https://fastapi.tiangolo.com/tutorial/response-status-code/ 응답 상태 코드 - FastAPI 응답 상태 코드 응답 모델과 같은 방법으로, 어떤 경로 작동이든 status_code 매개변수를 사용하여 응답에 대한 HTTP 상태 코드를 선언할 수 있습니다. @app.get() @app.post() @app.put() @app.delete() 기타 from fa fastapi.tiangolo.com 1. 응답 상태 코드 응답 모델과 같은 방법으로, 어떤 path operation이던 status_code 매개변수를 사용하여 아래와 같은 응답에 대한 HTTP 상태 코드를 선언할 수 있다. * status_code는 @method(decorator method)의 ..

[FastAPI] FastAPI [11] Cookie Parameters

https://fastapi.tiangolo.com/tutorial/cookie-params/ Cookie Parameters - FastAPI Cookie Parameters You can define Cookie parameters the same way you define Query and Path parameters. Import Cookie First import Cookie: Python 3.10+Python 3.9+Python 3.6+Python 3.10+ non-AnnotatedPython 3.6+ non-Annotated from typing import Annotated from fastapi.tiangolo.com * Query와 Path 변수 정의하는 방법과 동일하게 Cookie p..

[FastAPI] FastAPI [8] Body - Nested Models

https://fastapi.tiangolo.com/tutorial/body-nested-models/ Body - Nested Models - FastAPI Body - Nested Models With FastAPI, you can define, validate, document, and use arbitrarily deeply nested models (thanks to Pydantic). List fields You can define an attribute to be a subtype. For example, a Python list: This will make tags be a list, althou fastapi.tiangolo.com * FastAPI를 통해 임의의 깊은중첩모델을 정의, 검..

[FastAPI] FastAPI [7] Body - Fields

https://fastapi.tiangolo.com/tutorial/body-fields/ Body - Fields - FastAPI Body - Fields The same way you can declare additional validation and metadata in path operation function parameters with Query, Path and Body, you can declare validation and metadata inside of Pydantic models using Pydantic's Field. Import Field First, you fastapi.tiangolo.com * 경로연산함수의 Query, Path, Body paramter에서 부가적 검증..

[FastAPI] FastAPI [6] Body - Multiple Parameters

https://fastapi.tiangolo.com/tutorial/body-multiple-params/ Body - Multiple Parameters - FastAPI Body - Multiple Parameters Now that we have seen how to use Path and Query, let's see more advanced uses of request body declarations. Mix Path, Query and body parameters First, of course, you can mix Path, Query and request body parameter declarations fre fastapi.tiangolo.com Path와 Query를 어떻게 이용하는지 ..