Early version for manipulate Geo localization data trough API REST.

Overview

Backend para obtener los datos (beta)

Descripción

El servidor está diseñado para recibir y almacenar datos enviados en forma de JSON por una aplicación de Android que se ejecutará continuamente en segundo plano, como un servicio.

El JSON tiene el siguiente formato:

{
  "imei": "35xxxxxxxxx",  // IMEI estándar de 11 dígitos
  "latitude": "xx.xxxxx", // Latitud del dispositivo en formato decimal
  "longitude": "xx.xxxxx" // Longitud geográfica del dispositivo en formato decimal
}

Instalación

  • Clonar este repositorio
git clone https://github.com/victorovento/gpstracker-upr-beta.git
  • Instalar las dependencias
pip install -r requirements.txt

Recomiendo usar virtualenv: --> https://docs.python.org/3/library/venv.html

Instrucciones

Escribir en la consola:

python app.py

Debería devolver lo siguiente:

 * Serving Flask app 'app.py' (lazy loading)
 * Environment: development
 * Debug mode: off
   2021-11-12 14:52:40,321 INFO sqlalchemy.engine.Engine SELECT * FROM location WHERE location.imei = '111111111111'
   2021-11-12 14:52:40,322 INFO sqlalchemy.engine.Engine [raw sql] ()
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Configuraciones del servidor

Puedes ajustar los parámetros del servidor a tu gusto cambiando el valor de algunas variables de entorno:

  • En db_conection.py
DB_PATH = 'sqlite:///db/location.db' # Ruta de la base de datos SQlite
TABLE_NAME = 'location' # Nombre de la tabla para guardar las ubicaciones
  • En app.py
SERVER_HOST = '127.0.0.1' # IP del servidor
SERVER_PORT = '5000' # Puerto del servidor
DEBUG = False # Trastear tanto es malo

Próximamente

  • Compatibilidad con rutas GPS
  • Agrupar los endpoints de la API en resources
  • ... etc

Documentación en construcción...

Owner
Víctor Omar Vento Hernández
Backend Software Engineer
Víctor Omar Vento Hernández
A repository containing several general purpose Python scripts to automate daily and common tasks.

General Purpose Scripts Introduction This repository holds a curated list of Python scripts which aim to help us automate daily and common tasks. You

GDSC RCCIIT 46 Dec 25, 2022
This repository contains some utilities for playing with PKINIT and certificates.

PKINIT tools This repository contains some utilities for playing with PKINIT and certificates. The tools are built on minikerberos and impacket. Accom

Dirk-jan 395 Dec 27, 2022
A simple, console based nHentai Code Generator

nHentai Code Generator A simple, console based nHentai Code Generator. How to run? Windows Android Windows Make sure you have python and git installed

5 Jun 02, 2022
Convert any-bit number to decimal number and vise versa.

2deci Convert any-bit number to decimal number and vise versa. --bit n to set bit to n --exp xxx to set expression to xxx --r to run reversely (from d

3 Sep 15, 2021
Factoral Methods using two different method

Factoral-Methods-using-two-different-method Here, I am finding the factorial of a number by using two different method. The first method is by using f

Sachin Vinayak Dabhade 4 Sep 24, 2021
This script allows you to retrieve all functions / variables names of a Python code, and the variables values.

Memory Extractor This script allows you to retrieve all functions / variables names of a Python code, and the variables values. How to use it ? The si

Venax 2 Dec 26, 2021
Produce a simulate-able SDF of an arbitrary mesh with convex decomposition.

Mesh-to-SDF converter Given a (potentially nasty, nonconvex) mesh, automatically creates an SDF file that describes that object. The visual geometry i

Greg Izatt 22 Nov 23, 2022
An URL checking python module

An URL checking python module

Fayas Noushad 6 Aug 10, 2022
A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades

freqtrade-buyreasons A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades Usage Copy the buy_reasons.py script into

Robert Davey 31 Jan 01, 2023
A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

Matin Ardestani 13 Jul 30, 2022
A quick random name generator

Random Profile Generator USAGE & CREDITS Any public or priavte demonstrative usage of this project is strictly prohibited, UNLESS WhineyMonkey10 (http

2 May 05, 2022
produces PCA on genotypes from fasta files (popPhyl's ID format)

popPhyl_PCA Performs PCA of genotypes. Works in two steps. 1. Input file A single fasta file containing different loci, in different populations/speci

camille roux 2 Oct 08, 2021
Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices.

Airspy-Utils Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices on Linux (and other free syste

Dhiru Kholia 11 Oct 04, 2022
NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python.

NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python. Just add your files, set your configuration and run the scri

78 Dec 27, 2022
Yet another retry utility in Python

Yet another retry utility in Python, avereno being the Malagasy word for retry.

Haute École d'Informatique de Madagascar 4 Nov 02, 2021
Dependency injection lib for Python 3.8+

PyDI Dependency injection lib for python How to use To define the classes that should be injected and stored as bean use decorator @component @compone

Nikita Antropov 2 Nov 09, 2021
A (very dirty) experiment to remove layers from a Docker image.

Surgically remove layers from a Docker image (with a chainsaw)

Jérôme Petazzoni 9 Jun 08, 2022
Tools to connect to and interact with the Mila cluster

milatools The milatools package provides the mila command, which is meant to help with connecting to and interacting with the Mila cluster. Install Re

Mila 32 Dec 01, 2022
Multipurpose Growtopia Server tools, can be used for newbie to learn things.

Information Multipurpose Growtopia Server tools, can be used for newbie to learn things. Requirements - Python 3.x - Operating System (Recommended : W

Morphias 2 Oct 29, 2021
RapidFuzz is a fast string matching library for Python and C++

RapidFuzz is a fast string matching library for Python and C++, which is using the string similarity calculations from FuzzyWuzzy

Max Bachmann 1.7k Jan 04, 2023