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
This Is A Python Program To Showcase Two Modules (Gratient And Fade)

Hellooo, It's PndaBoi Here! This Is A Python Program To Showcase Two Modules (Gratient And Fade). I Really Like Both Of These Modules So I Decided To

PndaBoi! 6 May 31, 2022
Revolt.py - An async library to interact with the https://revolt.chat api.

Revolt.py An async library to interact with the https://revolt.chat api. This library will be focused on making bots and i will not implement anything

Zomatree 0 Oct 08, 2022
A Telegram bot written in python.

telegram_bot This bot is currently a beta project. Features A telegram bot which can: Send current COVID-19 cases/stats of Germany Send current worth

HuhnCares 1 Jan 11, 2022
Bringing Ethereum Virtual Machine to StarkNet at warp speed!

Warp Warp brings EVM compatible languages to StarkNet, making it possible to transpile Ethereum smart contracts to Cairo, and use them on StarkNet. Ta

Nethermind 700 Dec 26, 2022
Exporta archivos masivamente del TEC Digital.

TEC Digital Files Exporter Script que permite exportar los archivos de cursos del TEC Digital del Instituto Tecnológico de Costa Rica, debido al borra

Joseph Vargas 22 Apr 08, 2021
Google Sheets Python API

Google Spreadsheets Python API v4 Simple interface for working with Google Sheets. Features: Open a spreadsheet by title, key or url. Read, write, and

Anton Burnashev 6.2k Dec 30, 2022
A Telegram bot to all media and documents files to web link .

FileStreamBot A Telegram bot to all media and documents files to web link . Report a Bug | Request Feature 🍁 About This Bot : This bot will give you

Code X Mania 129 Jan 03, 2023
Python script using Twitter API to change user banner to see 100DaysOfCode process.

100DaysOfCode - Automatic Banners 👩‍💻 Adds a number to your twitter banner indicating the number of days you have in the #100DaysOfCode challenge Se

Ingrid Echeverri 10 Jul 06, 2022
A component of BuzzUtilityBot that allows for inter-server communication

A component of BuzzUtilityBot that allows for inter-server communication! Separated due to privacy and ease of inspection concerns

OHaiiBuzzle 2 Oct 11, 2022
Python bot for send videos of a Youtube channel to a telegram group , channel or chat

py_youtube_to_telegram Usage: If you want to install ytt and use it, run this command: sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/nima

Nima Fanniasl 8 Nov 22, 2022
A python script to acquire multiple aws ec2 instances in a forensically sound-ish way

acquire_ec2.py The script acquire_ec2.py is used to automatically acquire AWS EC2 instances. The script needs to be run on an EC2 instance in the same

Deutsche Telekom Security GmbH 31 Sep 10, 2022
Discord.py(disnake) selfbot

Zzee selfbot Discord.py selfbot Version: 1.0 ATTENTION! we are not responsible for your discord account! this program violates the ToS discord rules!

1 Jan 10, 2022
Advance Anonymous Sender bot with Caption Editor

AnonyMous Sender 👨‍💻 Advanced Anonymous Sender with Caption Editor Join @DaisySupport_Official 🎵 for help Features Get forwarded messages without f

Inuka Asith 13 Oct 09, 2022
yobot插件,Steam雷达,可自动播报玩家的Steam游戏状态和DOTA2图文战报

Steam_watcher 这是 prcbot/yobot 的自定义插件,可自动播报玩家的Steam游戏状态和DOTA2图文战报 都有些什么功能? 本插件可以在用户绑定后自动推送Steam游戏状态的更新和 Dota2 图文战报,以及提供一些手动查询功能 指令列表 atbot 表示需要@BOT ats

羽波 21 Jun 21, 2022
StringSessionGenerator - A Telegram bot to generate pyrogram and telethon string session

⭐️ String Session Generator ⭐️ Genrate String Session Using this bot. Made by TeamUltronX 🔥 String Session Demo Bot: Environment Variables Mandatory

TheUltronX 1 Dec 31, 2021
Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot

A101AktuelRobot Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot @A101AktuelRobot 💸 Bağış Yap ☕️ Kahve Ismarla 🌐 Telif Hakkı ve Lisans Copy

Ömer Faruk Sancak 10 Nov 02, 2022
微信支付接口V3版python库

wechatpayv3 介绍 微信支付接口V3版python库。 适用对象 wechatpayv3支持微信支付直连商户,接口说明详见 官网。 特性 平台证书自动更新,无需开发者关注平台证书有效性,无需手动下载更新; 支持本地缓存平台证书,初始化时指定平台证书保存目录即可。 适配进度 微信支付V3版A

chen gang 258 Jan 06, 2023
:spaghetti: Pastas is an open-source Python framework for the analysis of hydrological time series.

Pastas: Analysis of Groundwater Time Series Pastas: what is it? Pastas is an open source python package for processing, simulating and analyzing groun

Pastas 277 Dec 29, 2022
Telegram Voice-Chat Bot

Telegram Voice-Chat Bot [PyTGCalls] ⇝ Requirements ⇜ Account requirements A Telegram account to use as the music bot, You cannot use regular bot accou

1 Dec 03, 2021