Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 1.18 KB

File metadata and controls

80 lines (60 loc) · 1.18 KB

Если есть UV

uv init uv venv uv sync

Если нет UV

pip install fastapi, uvicorn, sqlmodel

#Запуск проекта python main.py

curl -X 'POST'
'http://127.0.0.1:8000/reviews'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{ "text": "еуые" }'

Response body Download { "id": 7, "text": "еуые", "sentiment": "neutral", "created_at": "2025-07-14T20:45:36.515971" }

curl -X 'POST'
'http://127.0.0.1:8000/reviews'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{ "text": "плох" }'

curl -X 'POST'
'http://127.0.0.1:8000/reviews'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{ "text": "плох" }'

Response body Download { "id": 12, "text": "плох", "sentiment": "neutral", "created_at": "2025-07-14T20:47:08.127741" }

curl -X 'POST'
'http://127.0.0.1:8000/reviews'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{ "text": "плохо" }'

Response body Download { "id": 10, "text": "плохо", "sentiment": "negative", "created_at": "2025-07-14T20:46:42.961499" }