{"id":26235862,"url":"https://github.com/cheeksthegeek/onebusaway-python","last_synced_at":"2026-04-15T17:31:34.292Z","repository":{"id":229092519,"uuid":"775747862","full_name":"CheeksTheGeek/onebusaway-python","owner":"CheeksTheGeek","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-22T02:11:37.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T06:49:31.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CheeksTheGeek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T01:02:00.000Z","updated_at":"2024-03-22T01:02:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3016a06-0b9b-4ec6-a430-7086b8f37f1f","html_url":"https://github.com/CheeksTheGeek/onebusaway-python","commit_stats":null,"previous_names":["cheeksthegeek/onebusaway-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CheeksTheGeek/onebusaway-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeksTheGeek%2Fonebusaway-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeksTheGeek%2Fonebusaway-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeksTheGeek%2Fonebusaway-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeksTheGeek%2Fonebusaway-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CheeksTheGeek","download_url":"https://codeload.github.com/CheeksTheGeek/onebusaway-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeksTheGeek%2Fonebusaway-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31852651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-13T03:18:14.259Z","updated_at":"2026-04-15T17:31:34.286Z","avatar_url":"https://github.com/CheeksTheGeek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneBusAway Python Client\n\n[![PyPI version](https://img.shields.io/pypi/v/onebusaway.svg)](https://pypi.org/project/onebusaway/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/onebusaway.svg)](https://pypi.org/project/onebusaway/)\n[![License](https://img.shields.io/pypi/l/onebusaway.svg)](https://pypi.org/project/onebusaway/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nThe OneBusAway Python Client is a Python library for interacting with the [OneBusAway API](https://onebusaway.org/). It provides a simple and convenient way to access real-time transit data, schedules, and other information from various transit agencies.\n\n## Features\n\n- **Comprehensive API Coverage**: Access a wide range of endpoints for retrieving transit data, including agency information, routes, stops, arrivals and departures, trip details, vehicle locations, and more.\n- **Flexible Usage**: Use the library in both synchronous and asynchronous modes, making it suitable for various application types, including web applications, scripts, and data analysis tasks.\n- **Easy Integration**: The library is designed to be intuitive and easy to use, with a straightforward API and comprehensive documentation.\n- **Robust Error Handling**: Enjoy robust error handling with custom exceptions for common API errors, such as missing or invalid API keys, bad requests, and more.\n- **Well-Tested**: The library is thoroughly tested, ensuring reliable and consistent behavior across different scenarios.\n\n## Installation\n\nYou can install the OneBusAway Python Client using pip:\n\n```\npip install onebusaway\n```\n\n## Getting Started\n\nFollow these steps to get started with the OneBusAway Python Client:\n\n1. **Obtain an API Key**: To use the OneBusAway API, you'll need to obtain an API key. Visit the [OneBusAway Developers](https://developers.onebusaway.org/) website to sign up and get your API key.\n\n2. **Set the API Key**: Set the `OBA_API_KEY` environment variable with your API key:\n\n```\nexport OBA_API_KEY=your_api_key\n```\n\n3. **Import the Client**: Import the `OneBusAway` class from the library:\n\n```python\nfrom onebusaway import OneBusAway\n```\n\n4. **Initialize the Client**: Initialize the `OneBusAway` client with the desired base URL (default is `api.pugetsound.onebusaway.org`):\n\n```python\noba = OneBusAway(base_url=\"api.pugetsound.onebusaway.org\")\n```\n\n5. **Use the Client**: Now you can start using the client to interact with the OneBusAway API:\n\n```python\n# Get a list of agencies with coverage\nagencies = oba.agency_with_coverage()\n\n# Get arrivals and departures for a stop\nstop_id = \"1_75403\"\narrivals_and_departures = oba.arrivals_and_departures_for_stop(stop_id)\n```\n\nFor more examples and detailed usage instructions, please refer to the [Usage](#usage) section.\n\n## Usage\n\nThe OneBusAway Python Client provides a wide range of methods to interact with the OneBusAway API. Here are some examples:\n\n### Agencies\n\n```python\n# Get a list of agencies with coverage\nagencies = oba.agency_with_coverage()\n\n# Get details for a specific agency\nagency_details = oba.agency(\"1\", get_references=True)\n```\n\n### Stops\n\n```python\n# Get arrivals and departures for a stop\nstop_id = \"1_75403\"\narrivals_and_departures = oba.arrivals_and_departures_for_stop(stop_id)\n\n# Get schedule for a stop\nstop_schedule = oba.schedule_for_stop(stop_id)\n```\n\n### Routes\n\n```python\n# Get routes for an agency\nagency_id = \"1\"\nroutes = oba.routes_for_agency(agency_id)\n\n# Get schedule for a route\nroute_id = \"1_100\"\nroute_schedule = oba.schedule_for_route(route_id)\n```\n\n### Trips\n\n```python\n# Get trips for a route\nroute_id = \"1_100\"\ntrips = oba.trips_for_route(route_id, includeSchedule=True)\n\n# Get trip details\ntrip_id = \"1_12345\"\ntrip_details = oba.trip_details(trip_id, includeSchedule=True)\n```\n\n### Vehicles\n\n```python\n# Get vehicles for an agency\nagency_id = \"1\"\nvehicles = oba.vehicles_for_agency(agency_id)\n```\n\nFor more details and a complete list of available methods, please refer to the [API Reference](#api-reference) section.\n\n## API Reference\n\nThe OneBusAway Python Client provides the following methods:\n\n### `OneBusAway` Class\n\n- `agency_with_coverage(get_references: bool = False) -\u003e List[Agency]`\n- `agency(id: str, get_references: bool = False) -\u003e AgencyDetails`\n- `arrival_and_departure_for_stop(id: str, tripId: str, serviceDate: int, vehicleId: Optional[str] = None, stopSequence: Optional[int] = None, get_references: bool = False) -\u003e ArrivalAndDeparture`\n- `arrivals_and_departures_for_stop(id: str, minutesBefore: Optional[int] = None, minutesAfter: Optional[int] = None, get_references: bool = False) -\u003e StopWithArrivalsAndDepartures`\n- `block(id: str, get_references: bool = False) -\u003e Block`\n- `get_config(get_references: bool = False) -\u003e Dict[str, Any]`\n- `current_time(get_references: bool = False) -\u003e datetime`\n- `report_problem_with_stop(stopId: str, code: str, userComment: Optional[str] = None, userLat: Optional[float] = None, userLon: Optional[float] = None, userLocationAccuracy: Optional[float] = None) -\u003e bool`\n- `report_problem_with_trip(tripId: str, serviceDate: int, vehicleId: str, stopId: str, code: str, userComment: Optional[str] = None, userOnVehicle: Optional[bool] = None, userVehicleNumber: Optional[str] = None, userLat: Optional[float] = None, userLon: Optional[float] = None, userLocationAccuracy: Optional[float] = None) -\u003e None`\n- `route_ids_for_agency(id: str, get_references: bool = False) -\u003e List[str]`\n- `route(id: str, get_references: bool = False) -\u003e Route`\n- `routes_for_agency(id: str, get_references: bool = False) -\u003e List[Route]`\n- `routes_for_location(lat: float, lon: float, radius: Optional[int] = None, latSpan: Optional[float] = None, lonSpan: Optional[float] = None, query: Optional[str] = None, get_references: bool = False) -\u003e List[Route]`\n- `schedule_for_route(id: str, date: Optional[str] = None, get_references: bool = False) -\u003e RouteSchedule`\n- `schedule_for_stop(id: str, date: Optional[str] = None, get_references: bool = False) -\u003e StopSchedule`\n- `shape(id: str, get_references: bool = False) -\u003e EncodedPolyline`\n- `stop_ids_for_agency(id: str, get_references: bool = False) -\u003e List[str]`\n- `stop(id: str, get_references: bool = False) -\u003e Stop`\n- `stops_for_location(lat: float, lon: float, radius: Optional[int] = None, latSpan: Optional[float] = None, lonSpan: Optional[float] = None, query: Optional[str] = None, get_references: bool = False) -\u003e List[Stop]`\n- `stops_for_route(id: str, includePolylines: Optional[bool] = None, time: Optional[str] = None, get_references: bool = False) -\u003e StopsForRoute`\n- `trip_details(id: str, serviceDate: Optional[int] = None, includeTrip: Optional[bool] = None, includeSchedule: Optional[bool] = None, includeStatus: Optional[bool] = None, time: Optional[str] = None, get_references: bool = False) -\u003e TripDetails`\n- `trip_for_vehicle(id: str, includeTrip: Optional[bool] = None, includeSchedule: Optional[bool] = None, includeStatus: Optional[bool] = None, time: Optional[str] = None, get_references: bool = False) -\u003e TripDetails`\n- `trip(id: str, get_references: bool = False) -\u003e Trip`\n- `trips_for_location(lat: float, lon: float, latSpan: float, lonSpan: float, includeTrip: Optional[bool] = None, includeSchedule: Optional[bool] = None, time: Optional[str] = None, get_references: bool = False) -\u003e List[TripDetails]`\n- `trips_for_route(id: str, includeStatus: Optional[bool] = None, includeSchedule: Optional[bool] = None, time: Optional[str] = None, get_references: bool = False) -\u003e List[TripDetails]`\n- `vehicles_for_agency(id: str, time: Optional[str] = None, get_references: bool = False) -\u003e List[VehicleStatus]`\n\nFor detailed information on each method, including parameter descriptions and return types, please refer to the [API Documentation](https://onebusaway.readthedocs.io/en/latest/api.html).\n\n## Contributing\n\nWe welcome and appreciate contributions from the community! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue on the [GitHub repository](https://github.com/cheeksthegeek/onebusaway-python).\n\nTo contribute, follow these steps:\n\n1. **Fork the repository** on GitHub.\n2. **Create a new branch** for your feature or bug fix: `git checkout -b my-new-feature`.\n3. **Make your changes** and commit them: `git commit -am 'Add some feature'`.\n4. **Push your changes** to your forked repository: `git push origin my-new-feature`.\n5. **Create a new pull request** on the main repository.\n\nPlease ensure that your code adheres to the project's coding standards and that all tests pass before submitting a pull request.\n\n## License\n\nThe OneBusAway Python Client is released under the [MIT License](https://opensource.org/licenses/MIT).\n\n## Support\n\nIf you have any questions, or issues, or need further assistance, please open an issue on the [GitHub repository](https://github.com/cheeksthegeek/onebusaway-python) or join our [discussion forum](https://github.com/cheeksthegeek/onebusaway-python/discussions).\n\n## Acknowledgments\n\nThe OneBusAway Python Client was inspired by the [OneBusAway API](https://onebusaway.org/) and the need for a robust and easy-to-use Python library to interact with it. We would like to express our gratitude to the OneBusAway team and the open-source community for their contributions and support.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheeksthegeek%2Fonebusaway-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheeksthegeek%2Fonebusaway-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheeksthegeek%2Fonebusaway-python/lists"}