Stack:
- Python
- FastAPI
- PostgreSQL
- Docker
-
Clone the repository
git clone [email protected]:Dzigr/quiz && cd quiz
-
Initiate configuration with Makefile command
make docker-install
This will create .env file with necessary variables, requirements file and build docker containers
-
Run application by
make docker
Without poetry
- Create virtual environment
python3 -m venv venv
- Activate virtual environment
source venv/bin/activate
- Install requirements via pip
pip install -r requirements.txt
- Run docker-compose
docker-compose up --build
GET /api/ping/ - checking application availability
POST /api/v1/questions/ - receive the body with number questions for further downloading, return the last uploaded question
Request example
{
"questions_num": 5
}
Response example
{
"question": "Sandburg called Chicago the \"City of Big\" these",
"answer": "Shoulders",
"created_at": "2022-12-30T19:21:03.128000Z"
}