Skip to main content

A simple package for reading data from the Tyne and Wear Metro API

Project description

TWMetro

TWMetro is a Python library that provides an interface to access and retrieve status information about the Tyne and Wear Metro system in the UK.

Currently Supported Features

  • Retrive a list of all Metro lines and their coordinate points
  • Retrieve a list of all Metro stations
  • Retrieve the status of all Metro trains
  • Retrieve a list of all Metro incidents

Installation

You can install the TWMetro library using pip:

pip install TWMetro

Usage

[!IMPORTANT] A JWT token is required to access the API. I cannot provide this token via scraping, so you will need to obtain it yourself from the Nexus website here.

from TWMetro import TWMetro

client = TWMetro("your_jwt_token_here")

# Get all Metro lines
lines = client.get_lines()

# Get all Metro stations
stations = client.get_metrostations()
# Get all Metro train status
trains = client.get_trainstatus()
# Get all Metro incidents
incidents = client.get_warnings()
# Get all metro lines
lines = client.get_metrolines()

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

twmetro-0.0.2.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

twmetro-0.0.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file twmetro-0.0.2.tar.gz.

File metadata

  • Download URL: twmetro-0.0.2.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for twmetro-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9333c6a485cd5102f44ee595f038a8ed8db7d2aa98ad91b8321dc9ce9f7b80c1
MD5 f03eb2fd6fdc696f3c107324a377c287
BLAKE2b-256 774d509917a91df355eef1c95e75e458a36640626756838d24f718ca11282740

See more details on using hashes here.

Provenance

The following attestation bundles were made for twmetro-0.0.2.tar.gz:

Publisher: pypi-publish.yml on sniff122/TWMetro

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

File details

Details for the file twmetro-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: twmetro-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for twmetro-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fbc61aa2de026544493ce8b1a39dd0590036e2e5827b476882c7f297816b297
MD5 9a71451d1b0943a026b221a1cad32501
BLAKE2b-256 d239ac8f45c2842ec6b8d3515732ee646ee3f6144dba8fab35128ffe7330a617

See more details on using hashes here.

Provenance

The following attestation bundles were made for twmetro-0.0.2-py3-none-any.whl:

Publisher: pypi-publish.yml on sniff122/TWMetro

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