Skip to content

David-Lor/VigoBusAPI

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •