Skip to content

Brites101/Placar_Bot

Repository files navigation

🤖 EXPA Bot

📚 Description

EXPA Bot was created to get information from EXPA System through an API GraphQL and to save on PostgreSQL's Database where International AIESEC give us a specific TOKEN to access that.
Then the bot use start date and end date of event to get information about approved,accepted,realized and applications of Exchange Participant from AIESEC. If bot to take any information that already there is on our database, it will update the information else it will insert new information.

📊 Dashboards

With all information that I've been collected, I've done 2 dashboards for AIESEC to follow their KPI (Key Performance Indicator) and MOS(measures of success).
OGX - Outgoing Exchange - http://bit.ly/apdsogxv1
ICX - Incoming Exchange - http://bit.ly/apdsicxv1

🚀 Technologies have used

Structure's Project 📌

|-- api
     |--graphqlconsume.py
     |--querygraphql.py
|-- controller
     |--RobotRotine.py
|-- database
     |--conexao.py
|-- _get_accepted_.py
|-- _get_applications_.py
|-- _get_approved_.py
|-- _get_realized_.py

🌏 Hosting

 Expa bot has been hosted on AWS Server by AIESEC in Brazil

📢 How to use

Required:

Token AIESEC
Python 3.7.5 or more
Node 10x
PostgreSQL's Database or other( But you will need change a lib to use your data base)

Tips about Linux's Environment:
Before everything you need to rum this command:

sudo apt update

Install Python 3:

sudo apt-get install python3

Install pip 3:

sudo apt-get install python3-pip

Install Node:

sudo apt install nodejs

Install npm:

sudo apt install npm

Create specific tables in your database,executing script below:

script_bd.sql

Install all python's dependencies with script below:

pip install  -r requirements.txt
pip3 install  -r requirements.txt(linux)

Install lib "pm2" on your node.js with NPM:

npm install -g pm2

After every installations you can execute the bot,at directory's project with console CMD:

pm2  start  _get_accepted_.py
pm2  start  _get_applications_.py
pm2  start   _get_approved_.py
pm2  start    _get_realized_.py

if your linux has other versions installed, you need to use:

pm2  start  _get_accepted_.py --interpreter python3
pm2  start  _get_applications_.py --interpreter python3
pm2  start   _get_approved_.py --interpreter python3
pm2  start    _get_realized_.py --interpreter python3

image

#TIPS PM2#

List all bots:

pm2  list

Stop a bot:

pm2  stop _get_realized_.py

Show bot's log:

pm2  logs _get_realized_.py

There are many commands on PM2 you can see at all in its documentation https://www.npmjs.com/package/pm2.

About

Python bot for ETL of GIS Analytics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages