¡Hola, Mundo!

  • 홈
  • 태그
  • 방명록

Basic Python/FastAPI 3

FastAPI-GET and POST

How HTTP works 1. Request('what', 'how') : Client(Browser) → Server ↑Through HTTP Request Message 2. Response : Server → Client(Browser) ↑Contains request information Message has Method(which means 'how') HEADER BODY GET VS POST GET POST Whether data is exposed on URL Yes No URL Example http://localhost:8080/items/?item_id=123&q=100 http://localhost:8080/items Data Location Header Body Caching A..

Basic Python/FastAPI 2022.07.21

FastAPI-Request Body

- Request Body(Not Necessarily) : send data from a Client(a browser) → API - Response Body(Necessarily) : data from API → a Client(a browser) Step 1. Declare a request body using Pydantic. from pydantic import BaseModel 2. Declare the data model as a class that inherits from BaseModel. class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = No..

Basic Python/FastAPI 2022.07.20

FastAPI

Step 1. Import FastAPI. 2. Create an app instance. 3. Write a path operation decorator (like @app.get("/")). 4. Write a path operation function. 5. Run the development server. #bash % uvicorn main:app --reload 6. Open the browser. Ex 1. #main.py from fastapi import FastAPI app=FastAPI() @app.get('/') async def read_bot(): return {'hello':'world'} FastAPI() : an object app : variable containing i..

Basic Python/FastAPI 2022.07.14
이전
1
다음
더보기
  • 분류 전체보기 (352)
    • Autonomous Vehicle (55)
      • Theory (14)
      • Sensors (11)
      • Video Geometry (24)
    • Deep Learning (20)
      • PyTorch (10)
      • Tensorflow (8)
      • CNN (7)
      • Object Detection (16)
    • Machine Learning (18)
    • Reinforcement Learning (4)
    • Analyze Data (29)
      • Python (2)
      • Python Libraries (20)
      • Measure of similarity (7)
    • KAFKA (6)
    • d3.js (20)
    • Environment (9)
      • Anaconda (4)
      • VisualStudioCode (3)
      • Jupyter (2)
    • JavaScript (10)
    • C# (6)
    • Linux (15)
      • terminal (9)
      • Nvidia (3)
    • Docker (17)
    • Git (7)
    • Concept (8)
      • Network (3)
    • Elastic Stack (6)
      • Elasticsearch (5)
      • Logstash (1)
    • Basic Python (49)
      • FastAPI (3)
      • Data Structure (1)
      • Workbook (5)
    • DataBase (11)
      • MYSQL (6)
      • MariaDB (1)
    • Math (20)
    • About me (1)

Tag

docker-compose, global variable, Step Function, forward propagation, Filter, d3js, axis, randn, yield from, nvidia-smi, Regular Expression, zeros, 3D Rotation Matrix, kafka, classmethod, textdistance, abstractmethod, batch size, Sigmoid function, selectall,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/12   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

Copyright © Kakao Corp. All rights reserved.

티스토리툴바