Skip to main content

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

Reason this release was yanked:

Failed CI

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.0.tar.gz (5.4 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.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: twmetro-0.0.0.tar.gz
  • Upload date:
  • Size: 5.4 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.0.tar.gz
Algorithm Hash digest
SHA256 b9fcfb4bdba3d9d1d49e00498d71f1c3826ba31e61f54a23688788d1269e6789
MD5 b2e3bf63207086baf5e13f7065d3c190
BLAKE2b-256 be9fab424fba9c1dba7c3f0091bfe35f375b7c126eb5c2940d067a98765ade36

See more details on using hashes here.

Provenance

The following attestation bundles were made for twmetro-0.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: twmetro-0.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afe6c57c297370fd90f719059d893d978173983f517d340cb1174e3ae1da100a
MD5 3e24df4a3f72a2207589aa5c792849df
BLAKE2b-256 40a1eb80da752cb54f0b58878b26ef1f7026e3f640d5f7ba4c07d849abe1f8da

See more details on using hashes here.

Provenance

The following attestation bundles were made for twmetro-0.0.0-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