Skip to main content

python-rrta

Python wrapper for the RRTA (MyStop) REST API.

Usage

import aiohttp
import asyncio
from rrta import RRTAClient

async def main():
    session = aiohttp.ClientSession()
    client = RRTAClient(session=session)

    routes = await client.get_all_routes()

    for route in routes:
        vehicles = await client.get_vehicles(route_ids=[route.RouteId])

        print(f"Route {route.RouteId}: {len(vehicles)} Vehicles")

        for v in vehicles:
            print(f"\t{v.VehicleId} currently en-route to {v.Destination} at {v.Speed} MPH")

if __name__ == "__main__":
    asyncio.run(main())

Installation

pip install rrta

Known Issues

  • Dataclasses are not pythonic at the moment and contain a bunch of member variables that RRTA doesn't seem to use despite being part of the MyStop spec

Metadata

Release files for rrta 0.1

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

Source distribution (sdist)

Source distribution for rrta 0.1
File Size Uploaded Provenance
rrta-0.1.tar.gz 7.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 17.9 kB

Release files / rrta-0.1.tar.gz

Download URL rrta-0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd5fb0d93b97b0b749fafa70781ef36e37135563ec6f18122ee81950700a2243
BLAKE2b-256 checksum
How to use checksums
bb8e29e061b623f0255c873a61ff2cb388990f2e18cabe6d10a7f6ae79519bc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Release files / rrta-0.1-py3-none-any.whl

Download URL rrta-0.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6042d4152943859b410218351b7edd157816fad58914304c89cdb68b81380a48
BLAKE2b-256 checksum
How to use checksums
ba96b858b6aff4a358d21ef67b7353ae602d95e6ddbe2195bad6ca6570183593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Security for rrta 0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

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