Skip to main content

Python wrapper for the OASA Telematics API

Project description

oasatelematics

PyPI version Python License: GPL v3

Python wrapper for the OASA Telematics API (Athens public transit).

Installation

pip install oasatelematics

Usage

import oasatelematics

# Get all lines
lines = oasatelematics.webGetLines()

# Get routes for a line
routes = oasatelematics.webGetRoutes(line_code)

# Get real-time arrivals at a stop
arrivals = oasatelematics.getStopArrivals(stop_code)

# Get closest stops to coordinates
stops = oasatelematics.getClosestStops(longitude, latitude)

# Get bus location on a route
buses = oasatelematics.getBusLocation(route_code)

Available Functions

Function Parameters Description
webGetLines() Get all lines
webGetLinesWithMLInfo() Get lines with master line info
webGetRoutes(linecode) line code Get routes for a line
webRouteDetails(routecode) route code Get route details
webGetStops(routecode) route code Get stops for a route
webRoutesForStop(stopcode) stop code Get routes serving a stop
webGetRoutesDetailsAndStops(routecode) route code Get route details and stops
getStopArrivals(stopcode) stop code Get real-time arrivals at a stop
getBusLocation(routecode) route code Get bus locations on a route
getScheduleDaysMasterline(linecode) line code Get schedule days for a master line
getLinesAndRoutesForMl(mlcode) master line code Get lines and routes for a master line
getRoutesForLine(linecode) line code Get routes for a line
getMLName(mlcode) master line code Get master line name
getLineName(linecode) line code Get line name
getRouteName(routecode) route code Get route name
getStopNameAndXY(stopcode) stop code Get stop name and coordinates
getSchedLines(mlcode, linecode, sdc_code) master line, line, schedule day code Get schedule lines
getClosestStops(lon, lat) longitude, latitude Get closest stops to coordinates
getDailySchedule(linecode) line code Get daily schedule

Development

pip install -e ".[dev]"         # install with dev dependencies
pytest -v                        # run unit tests (mocked)
pytest -m integration -v        # run integration tests (hits real API)

License

GPL-3.0

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

oasatelematics-0.4.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

oasatelematics-0.4-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file oasatelematics-0.4.tar.gz.

File metadata

  • Download URL: oasatelematics-0.4.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for oasatelematics-0.4.tar.gz
Algorithm Hash digest
SHA256 4e1b489443774f674451cfac86afe2c9b1c82d15c5e9a284200782ebd3b5b3b3
MD5 ad931adba02827d65fa017faa86cae09
BLAKE2b-256 368e8cb6ec6469415aed3209cd8fa3e406021c1be8f13ee81f214d88b5c3ff13

See more details on using hashes here.

File details

Details for the file oasatelematics-0.4-py3-none-any.whl.

File metadata

  • Download URL: oasatelematics-0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for oasatelematics-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9f1460c96e79ba38eb00789afadcd32b6586a6f479ebe28e1eb8b8890c65e6
MD5 f19feedf6e602710aa9c33acfe8920f9
BLAKE2b-256 3a93a07f97762290fec6dc39d1905e4ed9222bfef08f3dc3621a7029f143b5c8

See more details on using hashes here.

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