Skip to main content

Picture

metrovalencia-py

Estrellas de GitHub Versión de GitHub Licencia

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

panel API • documentación • documentació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{p.line} {p.destino}: llega en {p.seconds}s")

result = metro.paradas.buscar("Marítim")
print(f"Encontrado {len(result.paradas)} paradas")
for p in result.paradas:
  print(p)

ruta = metro.rutas.rutap("Colón", "Bailén")
print(f"Tiempo entre Colón y Bailén: {ruta.tiempo_total_minutos:.2f} minutos.") 
print(f"Tiempo entre paradas: {ruta.ruta[len(ruta.ruta) - 1].segundos_acumulados - ruta.ruta[0].segundos_acumulados} segundos")

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

Metadata

Release files for metrovalencia 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metrovalencia 0.1.2
File Size Uploaded Provenance Actions
metrovalencia-0.1.2.tar.gz 18.0 kB With provenance Details for metrovalencia-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metrovalencia 0.1.2
File Interpreter ABI Platform Actions
metrovalencia-0.1.2-py3-none-any.whl Python 3 none any Details for metrovalencia-0.1.2-py3-none-any.whl

Total release size: 43.5 kB

Release files / metrovalencia-0.1.2.tar.gz

Download URL metrovalencia-0.1.2.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f630fb08567160191183fdc507d613a388d2dfe2f0adf9d84d7af05e59222c6c
BLAKE2b-256 checksum
How to use checksums
d4580e9fe893f7dea53e796b63da191080a3a709221d0c2f81cc8d9f23b51b13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Release files / metrovalencia-0.1.2-py3-none-any.whl

Download URL metrovalencia-0.1.2-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c355c4221be22a77357c93e183ceb1d2dfb1b357280ecd2effec0be1c410966c
BLAKE2b-256 checksum
How to use checksums
16fec5480ebf7131514f2aa2324c2f7a3b078e3e98e80fda92cbd268f1cdb174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Security for metrovalencia 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for metrovalencia-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page