MoisesArevalo / todo-legal-technical-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Technical test

For sql database:

  • Type: relational
  • SqlLite
  • Squema that I used. alt sql-squema

For web service:

  • Language: python
  • Framework: fastAPI
  • Logic diagram proposed:

alt web service diagram

Instructions:


1. Install all dependencies (I used python 3.10)

pip install -r requirements.txt
2. Run service with:

uvicorn app:app --port 1234 --reload
3. Change the url of the webhook if necessary. .env > WEBHOOK

Actions enables:

To add new data:


- currency

POST: /currency

{ "name":"" }

  • currency value

POST: /currency/value

{ "date":"", "value":"", "name":"" }

To get data


- currency

GET: /currency/value/{currency_name}

example: /currency/value/eur

  • unique currency value

GET: /currency/value/currency_name?date=dd/mm/yyyy

example: /currency/value/eur?date=09/09/2022{id}

  • all currency value

GET: /currency/value/all/currency_name?date=dd/mm/yyyy

example: /currency/value/all/eur?date=09/09/2022{id}

About


Languages

Language:Python 99.0%Language:Shell 1.0%