Python 3.9
Flask 2.1.3
MySQL 5.7
Redis 5
Peewee 3.15.1
Docker
pytest --cov=app
pytest --cov=app tests/ --cov-report=html
To create a book application on docker, you need to have a docker installed in your machine and run this command inside book directory.
docker-compose up --build
- Draw.io file: LINK
- Postman file: LINK
{
"next": null,
"previous": null,
"books": [
{
"id": 41017,
"title": "South Africa and the Transvaal War, Vol. 5 (of 8): From the Disaster at Koorn Spruit to Lord Roberts's Entry into Pretoria",
"authors": [
{
"name": "Creswicke, Louis",
"birth_year": null,
"death_year": null
}
],
"languages": [
"en"
],
"download_count": 65
},
{
"id": 17786,
"title": "Mga Dakilang Pilipino; o ang kaibigan ng mga nagaaral",
"authors": [
{
"name": "Sevilla, Jose N.",
"birth_year": 1880,
"death_year": 1946
}
],
"languages": [
"tl"
],
"download_count": 65
}
]
}
{
"book_id": 5,
"rating": 2,
"review": "Este livro eh medio 2"
}
{
"id": 1,
"book_id": 5,
"rating": 2,
"review": "Este livro eh medio 2"
}
{
"id": 84,
"title": "Frankenstein; Or, The Modern Prometheus",
"authors": [
{
"name": "Shelley, Mary Wollstonecraft",
"birth_year": 1797,
"death_year": 1851
}
],
"languages": [
"en"
],
"download_count": 17482,
"rating": 3.7,
"reviews": [
"Este livro eh mais ou menos...2",
"Este livro eh mais ou menos...1",
"Este livro eh bom demais 5",
"Este livro eh bom 4",
"Este livro eh medio 3",
"Este livro eh medio 3",
"Este livro eh medio 3",
"Este livro eh medio 3",
"Este livro eh medio 3"
]
}
{
"message": "rating top 5 average",
"ratings": [
{
"book_id": 1,
"rating": 5
},
{
"book_id": 2,
"rating": 4
},
{
"book_id": 84,
"rating": 3
},
{
"book_id": 4,
"rating": 1
},
{
"book_id": 3,
"rating": 1
}
]
}
{
"message": "rating top avg by July ",
"ratings": [
{
"book_id": 1,
"rating": 5
},
{
"book_id": 2,
"rating": 4
},
{
"book_id": 84,
"rating": 3
},
{
"book_id": 4,
"rating": 1
},
{
"book_id": 3,
"rating": 1
}
]
}