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.

Owner
Ícaro Sant'Ana
Back-end Developer and Cryptocurrency enthusiast.
Ícaro Sant'Ana
Want to play What Would Rather on your Server? Invite the bot now!😏

What is this Bot? 👀 What You Would Rather? is a Guessing game where you guess one thing. Long Description short Take this example: You typed r!rather

丂ㄚ么乙ツ 2 Nov 17, 2021
A Python Script to automate searching of available vaccination centers in the city and hence booking

Cowin Vaccine Availability Notifier Cowin Vaccine Availability Notifier takes your City or PIN code as an input and automatically notifies you via ema

Jayesh Padhiar 7 Sep 05, 2021
This repository contains modules that extend / modify parts of Odoo ERP

Odoo Custom Addons This repository contains addons that extend / modify parts of Odoo ERP. Addons list account_cancel_permission Only shows the button

Daniel Luque 3 Dec 28, 2022
RequestTrackerBot - Request Tracker Bot With Python

Request Tracker Bot This is a Request Tracker Bot repo, It is for those who uplo

Prince Jaiswal 1 Dec 30, 2021
A powerful, cool and well-made userbot for your Telegram profile with promising extension capabilities.

Telecharm userbot A powerful, fast and simple Telegram userbot written in Python 3 and based on Pyrogram 1.X. Currently in active WIP state, so feel f

Daniil Kovalenko 16 Dec 01, 2022
An anime themed telegram group management bot based on sqlalchemy database running on python3.

Kazuko Robot A Telegram Python bot running on python3 forked with saitama and DiasyX with a sqlalchemy database and an entirely themed persona to make

heyaaman 22 Dec 07, 2022
This checks that your credit card is valid or not

Credit_card_Validator This checks that your credit card is valid or not. Where is the app ? main.exe is the application to run and main.py is the file

Ritik Ranjan 1 Dec 21, 2021
A simple Python wrapper for the archive.is capturing service

archiveis A simple Python wrapper for the archive.is capturing service. Installation pipenv install archiveis Python Usage Import it. import archi

PastPages 157 Dec 28, 2022
Crypto Signal Provider - A web application that allows users to select a cryptocurrency

Crypto_Signal_Provider This is a web application that allows users to select a c

Raul 2 Dec 11, 2022
Solves bombcrypto newest captcha

Solves Bombcrypto newest captcha A very compact implementation using just cv2 and ctypes, ready to be deployed to your own project. How does it work I

19 May 06, 2022
Python Package For MTN Zambia Momo API. This package can also be used by MTN momo in other countries.

MTN MoMo API Lite Python Client Power your apps with Lite-Python MTN MoMo API Usage Installation Add the latest version of the library to your project

Mathews Musukuma 7 Jan 01, 2023
Python client for CoinPayments API

pyCoinPayments - Python API client for CoinPayments Updates This library has now been converted to work with python3 This is an unofficial client for

James 27 Sep 21, 2022
Python interface to the LinkedIn API

Python LinkedIn Python interface to the LinkedIn API This library provides a pure Python interface to the LinkedIn Profile, Group, Company, Jobs, Sear

ozgur 844 Dec 27, 2022
Stack overflow search API

Stack overflow search API

Vikash Karodiya 1 Nov 15, 2021
Status-embed - Cool open source profile embed for Discord

Current Status : Incomplete Status Embed Status Embed is an awesome open source

Ritabrata Das 2 Feb 17, 2022
Instagram Account Creator 🥰

Instagram Account Creatorr Instagram account creator that uses requests instead of selenium! Report Bug · Request Feature Features Request based Conta

dropout 9 Oct 27, 2021
A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

David .K. Danso 1 Jan 17, 2022
A modern, easy to use, feature-rich, and async ready API wrapper improved and revived from original discord.py.

A Python API wrapper that is improved and revived from the original discord.py

Orion 19 Nov 06, 2021
An API wrapper around Discord API written in Python

Diskord This library is a maintained fork of now archived library, discord.py. A modern and easy to use API wrapper around Discord API written in Pyth

Diskord 36 Aug 22, 2022
Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected discord server via Nextcordbot API.

Steam-Workshop-Monitor Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected Discord channel via Nextcordbo

7 Nov 03, 2022