A Flask API for a DEPT challenge for a back end position
Find a file
2025-11-02 15:53:32 -03:00
dept_challenge Filter support 2022-09-05 06:02:01 +00:00
nginx Added Nginx support 2022-09-04 22:49:52 -03:00
.env.example Multiple fixes 2022-09-04 23:33:31 -03:00
.gitignore Filter support 2022-09-05 06:02:01 +00:00
.gitlab-ci.yml Typo and missing files 2022-09-05 01:27:30 -03:00
.pylintrc Typo and missing files 2022-09-05 01:27:30 -03:00
docker-compose.yml Multiple fixes 2022-09-04 23:33:31 -03:00
Dockerfile Set up server 2022-09-03 17:06:53 -03:00
openapi.yaml Filter support 2022-09-05 06:02:01 +00:00
Pipfile Version Locking for Pipfile 2022-09-05 01:32:10 -03:00
Pipfile.lock Filter support 2022-09-05 06:02:01 +00:00
Readme.md Edit Readme.md 2025-11-02 15:53:32 -03:00
start_server.sh Set up server 2022-09-03 17:06:53 -03:00

DEPT Back End Challenge

Hi! This is my solution for the Challenge of DEPT , for the Back End Software Engineer position

Task

Crear una API de gestión de libros y comentarios sobre los mismos. No se requiere implementar usuarios ni permisos y, en lo posible, hacer la implementación usando Flask o fastAPI (aunque no es excluyente).

Para proveedor de la información sobre los libros, se puede usar https://openlibrary.org/dev/docs/api/books Esta API deberá consistir en lo siguiente:

  • Obtener información de un libro por ISBN
  • Guardar información de un libro
  • Obtener una lista de libros
  • Permitir operaciones CRUD sobre comentarios en un libro.
  • Dejar abierta la posibilidad de intercambiar openlibrary por cualquier otra API (parametrización del proveedor de la info sobre los libros)

Stack

  • Docker
  • Docker-Compose
  • Nginx
  • Flask
  • Flask-SQLAlchemy
  • Gunicorn
  • Gevent
  • MySQL

API Documentation

OpenAPI Specs

Usage

  1. Install Docker and Docker-Compose
  2. Copy .env.example into .env and fill the gaps
  3. docker-compose up --build -d
  4. Check app status with curl http://localhost/api/v1/health
  5. Profit

Testing

  1. Install pipenv
  2. Run pipenv install
  3. Change directory to dept-challenge: cd dept-challenge
  4. Run tests with pipenv run python -m pytest -v

To Do / Nice to have

If I had more time , these features would be the next steps:

  • Continuous Integration with Terraform
  • Integration tests / E2E Tests
  • Even more unit tests coverage, and reuse testing code
  • Improved pagination, added more filtering and ordering support
  • Cache system ( flask-caching + redis )
  • Load the book details async with a Celery job