Skip to main content

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

Metadata

Release files for oasatelematics 0.4

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

Source distribution (sdist)

Source distribution for oasatelematics 0.4
File Size Uploaded
oasatelematics-0.4.tar.gz 17.1 kB Details

Built distribution (wheel)

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

Total release size: 32.5 kB

Release files / oasatelematics-0.4.tar.gz

Download URL oasatelematics-0.4.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4e1b489443774f674451cfac86afe2c9b1c82d15c5e9a284200782ebd3b5b3b3
BLAKE2b-256 checksum
How to use checksums
368e8cb6ec6469415aed3209cd8fa3e406021c1be8f13ee81f214d88b5c3ff13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.16

Release files / oasatelematics-0.4-py3-none-any.whl

Download URL oasatelematics-0.4-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b9f1460c96e79ba38eb00789afadcd32b6586a6f479ebe28e1eb8b8890c65e6
BLAKE2b-256 checksum
How to use checksums
3a93a07f97762290fec6dc39d1905e4ed9222bfef08f3dc3621a7029f143b5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

1 release file

0.2

1 release file

0.1

1 release file

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