Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.96 KB

README.md

File metadata and controls

72 lines (53 loc) · 2.96 KB

GitHub commit activity GitHub last commit

Python GitHub Actions Sentry

ruff black mypy bandit

Translation Service

Web service with REST API to get Google translation

Technologies and libraries: python, fastapi, mongodb, motor, mongodb-migrations, gunicorn, sentry, docker, pytest, linters

Technologies

How to ...

... run application

make up

... stop application

make down

... run tests

make tests

... run linters

make check

... find Swagger UI

Swagger UI


Original task

Translation Service Challenge

Goal

The goal of this challenge is to create a microservice providing a JSON API to work with word definitions/translations taken from Google Translate. Note that support of anything longer than a single word is not required.

Endpoints

  • Get the details about the given word. The response shall include definitions, synonyms, translations and examples (e.g. challenge word translation). Data fetched from Google Translate has to be saved in the DB. When a request arrives to the endpoint, the handler has to look for the word in the DB first and fall back to Google Translate only if it is not there.
  • Get the list of the words stored in the database. Pagination, sorting and filtering by word is required. Partial match has to be used for filtering. Definitions, synonyms and translations shall not be included in the response by default but can be enabled by providing corresponding query parameters.
  • Delete a word from the database.

Non functional requirements

  • Python 3
  • FastAPI in async mode
  • Dockerfile and docker-compose.yml have to be included
  • NoSQL database
  • Authentication is not required