Coder Social home page Coder Social logo

david-lor / vigobusapi Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 3.0 432 KB

Updated REST API that provide Stops and Buses information for the public transport system of the city of Vigo (Galicia/Spain) 馃殞馃殢

License: Apache License 2.0

Python 98.51% Shell 1.49%
vigo vigobus bus-schedule bus-route bus-tracking public-transportation public-transport api python vitrasa

vigobusapi's Introduction

Python VigoBusAPI

OpenAPI docs (stable) OpenAPI docs (develop)

Intermediate Python + FastAPI API that provide Stop and Bus information provided by the public transport system of the city of Vigo (Galicia/Spain).

The goal of this API is to keep the different data sources and APIs available on one single API with better endpoints structure and more clear data output format (as JSON).

The API can output Stop information and real-time lists of Buses coming to a certain Stop, with their remaining time in minutes.


API intermedia basada en Python + FastAPI que provee informaci贸n de Paradas y Autobuses para el sistema de transporte p煤blico de la ciudad de Vigo (Galicia/Espa帽a).

El objetivo de esta API es unificar las diferentes fuentes de datos y APIs disponibles en una s贸la API con mejor estructura de endpoints y una salida de datos con un formato m谩s claro (como JSON).

La API puede devolver informaci贸n de Paradas y listados en tiempo real de los Autobuses que pasar谩n por una Parada concreta, con su tiempo restante en minutos.

Features

  • API powered by FastAPI, offering a REST API focused web server, fully async and auto-generating documentation.
  • Nice-looking, human-readable & easily-parseable endpoint response output as JSON, compared with original data sources.
  • Local data storages: Stop cache, Stop MongoDB, Buses cache; to reduce requests to the external API/data sources.
  • Original API/data source fixes in Stop names and Buses lines/routes.
  • Environment variables / DotEnv file - based settings system.

  • API basada en FastAPI, que ofrece un servidor web orientado a API REST, as铆ncrono y que auto-genera documentaci贸n.
  • Respuestas formateadas como JSON, con mejor estructura, legibles, coherentes y f谩cilmente procesables, en comparaci贸n con los resultados de las fuentes originales.
  • Sistemas de almacenamiento local: cach茅 de Paradas, base de datos MongoDB de Paradas, cach茅 de Autobuses; para as铆 reducir las peticiones a las API/fuentes de datos externas.
  • Arreglo de nombres de Paradas y l铆neas/rutas de Autobuses en los datos devueltos por las API/fuentes de datos originales.
  • Sistema de configuraci贸n basado en variables de entorno / archivo DotEnv.

Requirements


Endpoints

  • /stop/<stop_id> : Get information about a Stop (name, location), given the Stop ID / Obtener informaci贸n de una Parada (nombre, ubicaci贸n), dado un c贸digo de parada
  • /buses/<stop_id> / /stop/<stop_id>/buses : Get the Buses that will arrive to a Stop, given the Stop ID / Obtener los Autobuses que pasar谩n por una Parada, dado su c贸digo de parada
  • /stops?stop_name=<name>&limit=<limit> : Search stops by name (optional limit) / Buscar paradas por nombre (l铆mite opcional)
  • /stops?stop_id=<id2>&stop_id=<id2> : Search multiple stops by id in the same request
  • /docs : Swagger UI (documentation) auto-generated by FastAPI / Documentaci贸n Swagger UI auto-generada por FastAPI

TODO

  • Improve Swagger/OpenAPI documentation
  • Add static route information endpoints
  • Add Near Stops endpoint
  • Add endpoint for static maps and StreetView acquisition
  • Add endpoints for static buses info
  • Add integration tests
  • Add detailed install & configuration instructions

  • Mejorar la documentaci贸n de Swagger/OpenAPI
  • A帽adir endpoint para consulta de rutas est谩ticas
  • A帽adir endpoint para consulta de paradas cercanas a ubicaci贸n
  • A帽adir endpoint para obtenci贸n de mapas est谩ticos y StreetView
  • A帽adir endpoints para consulta de informaci贸n est谩tica de buses
  • A帽adir tests de integraci贸n
  • A帽adir instrucciones detalladas de instalaci贸n y configuraci贸n

Disclaimer

This project is not endorsed by, directly affiliated with, maintained by, sponsored by or in any way officially connected with the company or companies responsible for the public transport service of the city of Vigo.


Este proyecto no cuenta con soporte, no est谩 afiliado con, mantenido por, patrocinado por ni en cualquier otra manera oficialmente conectado con la compa帽铆a o compa帽铆as responsables del sistema de transporte p煤blico de la ciudad de Vigo.

vigobusapi's People

Contributors

david-lor avatar dependabot[bot] avatar github-actions[bot] avatar lodeiro0001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vigobusapi's Issues

VigoBus en Homeassistant

Hola, me gustar铆a saber si existe posibilidad de que la app pueda ser integrada en Homeassistant mediante HACS. Esto con el fin de poder visualizar en el lovelace de HA las tarjetas en tiempo real de determinadas paradas de buses. Gracias de antemano.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 馃搳馃搱馃帀

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.