Skip to main content

Python SDK for MetroValencia API

Project description

Picture

metrovalencia-py

GitHub stars GitHub release

Un paquete de Python para obtener datos de Metrovalencia usando MetroAPI, la API no oficial.

panel APIdocumentacióndocumentación MetroAPI

Inicio rápido

from metrovalencia import MetroValencia

metro = MetroValencia(
    app_name="miapp",
    contact="dev@ejemplo.com"
)

previsiones = metro.previsiones.get("Alameda")
for p in previsiones.previsiones:
    print(f"Línea {p.line} va a {p.destino} y llega en {p.seconds}s")

result = metro.paradas.buscar("Marítim")
print(f"He encontrado {len(result.paradas)} paradas")

ruta = metro.rutas.rutap("Colón", "Bailén")
print(f"Vas a tardar como {ruta.tiempo_total_minutos:.2f} minutillos")

metro.close()

Documentación

Puedes ver la documentación en repo/docs/README.md.

Datos

Puedes elegir el formato de las respuestas usando response_type. Hay tres opciones:

  • class (por defecto): Datos en dataclasses
  • json: Respuesta exacta del servidor.
  • parsed_json: JSON pero más limpio (se quitan los null y se utiliza snake_case).
metro = MetroValencia(
    app_name="miapp",
    contact="dev@ejemplo.com",
    response_type="class"  # por defecto
)

¿Qué puedes hacer?

  • Puedes ver previsiones o el estado de las paradas
  • Ver las incidencias de transporte o accesibilidad
    • Ver incidencias v2, en pruebas, basadas en los Tweets y Incidencias de la API, categorizadas con IA.
  • Ver información de tarjetas de metro
  • Hacer rutas entre dos paradas
  • Información, como las tarifas, zonas
  • Obtener las noticias de metrovalencia

Historial de Estrellas

Star History Chart

Licencia

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metrovalencia-0.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metrovalencia-0.1.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file metrovalencia-0.1.0.tar.gz.

File metadata

  • Download URL: metrovalencia-0.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metrovalencia-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aea676be611c1dfcbf6de9910483092fbe58696f67e122cfa6c4b16606cc52e8
MD5 5b4345179bc499641a9e560517e1a614
BLAKE2b-256 d795e05628133ef97be831cf8e3a4c9f4b652386eb07357ccbe1fb2fb7192621

See more details on using hashes here.

Provenance

The following attestation bundles were made for metrovalencia-0.1.0.tar.gz:

Publisher: publish.yml on sayborduu/metrovalencia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metrovalencia-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: metrovalencia-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metrovalencia-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e1e284f3725974d9636ab6a682ae1561ea2acd393a1ba04d3d026271efbf9c3
MD5 ecbe7477f278555e869f65b336ca0ee9
BLAKE2b-256 373082e6896f56ba7c365756cb27bc9e868e5036ed3dc8af30ba074f082b4804

See more details on using hashes here.

Provenance

The following attestation bundles were made for metrovalencia-0.1.0-py3-none-any.whl:

Publisher: publish.yml on sayborduu/metrovalencia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page