Project developed as part of a selection process for the company Denox

Overview

logo

Status LinkedIn


📝 Tabela de conteúdos

🧐 Sobre

Projeto desenvolvido como parte de um processo seletivo da empresa Denox. Nesse projeto foi desenvolvido uma API usando Tornado onde tem a função de calcular a distância percorrida, o tempo em movimento, o tempo parado e os centroides das posições paradas de um veiculo rastreado.

📝 Requisitos para rodar o projeto

  • Python3
  • Docker
  • Docker Compose

💭 Instalação

1.Instale o Docker seguindo o tutorial a seguir: https://docs.docker.com/engine/install/ubuntu/

2.Instale o Docker Compose seguindo o tutorial a seguir: https://docs.docker.com/compose/install/

3.Clone este repositório usando o seguinte comando:

$ git clone [email protected]:smookeydev/denox-api.git

4.Acesse a pasta do projeto em seu terminal:

$ cd denox-api

5.Rode o comando de instalação das bibliotecas utilizada no projeto.

$ pip3 install -r requirements.txt

6.Copie o arquivo de configuração de exemplo para um arquivo de configuração real:

$ cp .env.example .env

7.Troque os valores existentes no arquivo de configuração, os valores são:

  • DB_HOST: Endereço IPV4 a ser utilizado para conexão do banco de dados. (Opcional)
  • DB_PORT: Porta que será usada para o banco de dados. (Opcional)
  • DB_NAME: Nome do banco de dados. (Opcional)
  • DB_USER: Usuário do banco de dados. (Obrigatório)
  • DB_PASS: Senha do usuário do banco de dados. (Obrigatório)

8.Inicie o banco de dados rodando o seguinte comando:

$ make up

9.Inicie a API rodando o seguinte comando:

$ python3 main.py

📲 Rotas da API

Método Rota Argumentos
POST /api/calcula_metricas { "serial": "", "datahora_inicio": "", "datahora_fim": "" }
GET /api/retorna_metricas

🔰 Observações

  • Comentei grande parte do código, para fácil entendimento de quem for analisar.

  • Efetuei um pequeno tratamento no banco de dados, já que todos os dados estavam formatados como string.

  • Nesse repositorio existe um arquivo chamado denox-api.json, que é um documento exportado do Insomnia com as rotas da API e dados de exemplo.

You might also like...
This is a very easy to use tool developed in python that will search for free courses from multiple sites including youtube and enroll in the ones in which it can.
This is a very easy to use tool developed in python that will search for free courses from multiple sites including youtube and enroll in the ones in which it can.

Free-Course-Hunter-and-Enroller This is a very easy to use tool developed in python that will search for free courses from multiple sites including yo

This Instagram app created as a clone of instagram.Developed during Moringa Core.

Instagram This Instagram app created as a clone of instagram.Developed during Moringa Core. AUTHOR By: Nyagah Isaac Description This web-app allows a

A simple telegram bot to help you to remove forward tag from post from any messages . Maded in python3 using @Pyrogram . Developed by @Kunal-Diwan

Frwd-Tag-Remover Telegram Bot to Remove forward tag from any Post . If you need any more modes in repo or If you find out any bugs, mention in @Develo

Trading Strategies (~50%) developed by GreenT on QuantConnect platform over the autumn quarter
Trading Strategies (~50%) developed by GreenT on QuantConnect platform over the autumn quarter

Trading Strategies ~50% of codes from the Applied Financial Technology Course. Contributors: Claire W. Derrick T. Frank L. Utkarsh T. Course Leads: Dy

New developed moderation discord bot by archisha

Monitor42 New developed moderation discord bot by αrchιshα#5518. Details Prefix: 42! Commands: Moderation Use 42!help to get command list. Invite http

Discord bot developed by Delhi University Student Community!

DUSC-Bot Discord bot developed by Delhi University Student Community! Libraries Used Pycord - Documentation Features Can purge messages in bulk Drop-D

A Twitter bot developed in Python using the Tweepy library and hosted in AWS.

Twitter Cameroon: @atangana_aron A Twitter bot developed in Python using the Tweepy library and hosted in AWS. https://twitter.com/atangana_aron Cost

Bot developed in python, 100% open-source, compatible with Windows and Linux.
Bot developed in python, 100% open-source, compatible with Windows and Linux.

Bombcrypto Bot [Family JOW] Bot desenvolvido em python, 100% do código é aberto, para aqueles que tenham conhecimento validarem que não existe nenhum

Owner
Ícaro Sant'Ana
Back-end Developer and Cryptocurrency enthusiast.
Ícaro Sant'Ana
GET-ACQ is a python tool used to gather all companies acquired by a given company domain name.

get-acq ?? GET-ACQ is a python tool used to gather all companies acquired by a given company domain name. It is done by calling SecurityTrails API. Us

Milan 7 Dec 19, 2022
This Python script will automate the process of uploading your project to GitHub.

ProjectToGithub This Python script will help you to upload your project to Github without having to type in any commands !!! Quick Start guide First C

Imira Randeniya 1 Sep 11, 2022
The Easy-to-use Dialogue Response Selection Toolkit for Researchers

Easy-to-use toolkit for retrieval-based Chatbot Our released data can be found at this link. Make sure the following steps are adopted to use our code

GMFTBY 32 Nov 13, 2022
A part of HyRiver software stack for accessing hydrology data through web services

Package Description Status PyNHD Navigate and subset NHDPlus (MR and HR) using web services Py3DEP Access topographic data through National Map's 3DEP

Taher Chegini 51 Dec 10, 2022
Discord Bot for server hosts, devs, and admins. Analyzes timings reports & uploads text files to hastebin. Developed by https://birdflop.com.

"Botflop" Click here to invite Botflop to your server. Current abilities Analyze timings reports Paste a timings report to review an in-depth descript

Purpur 76 Dec 31, 2022
An instagram bot developed in Python with Selenium that helps you get more Instagram followers.

instabot An instagram bot developed in Python with Selenium that helps you get more Instagram followers. Install You’ll need to have: Python Selenium

null 65 Nov 22, 2022
Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single bot.

Discord ToolBox Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single b

null 3 Aug 7, 2021
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
nuub-bot is a multi-purpose designed and developed in python3

nuub-bot About Nuub-Bot is an open source, fully customizable Discord bot that is constantly growing. You can invite it to your Discord server using t

Baneet Parmar 8 Jun 28, 2022