{"id":16617563,"url":"https://github.com/ddworken/pywmata","last_synced_at":"2025-10-29T19:31:32.706Z","repository":{"id":26864929,"uuid":"30325159","full_name":"ddworken/pyWMATA","owner":"ddworken","description":"A python library for accessing the WMATA API for Washington DC Metro. ","archived":false,"fork":false,"pushed_at":"2015-02-21T05:57:28.000Z","size":222,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T04:41:10.440Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddworken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-04T22:37:33.000Z","updated_at":"2022-09-28T05:45:31.000Z","dependencies_parsed_at":"2022-08-31T23:20:42.564Z","dependency_job_id":null,"html_url":"https://github.com/ddworken/pyWMATA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FpyWMATA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FpyWMATA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FpyWMATA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FpyWMATA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddworken","download_url":"https://codeload.github.com/ddworken/pyWMATA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238882343,"owners_count":19546491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-12T02:17:07.299Z","updated_at":"2025-10-29T19:31:27.411Z","avatar_url":"https://github.com/ddworken.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyWMATA\nA python library for accessing the WMATA API for Washington DC Metro. \n##Usage\n```python\n  apikey = '' ###API keys available here https://developer.wmata.com/\n\n  api = pyWMATA.WMATA(apikey)\n```\n\n=====\nTo get departure times for a given stationcode\n```python\n  stationcode = 'F01' #Gallery place metro\n\n  times = api.getTrainDepartures(stationcode)\n```\nReturns a list of times until train departures from the given station.\n\n=====\nTo get departure times for a given stationcode in a certain direction\n```python\n  stationcode = 'F01' #Gallery place metro\n  \n  times = api.getTrainDepartures(stationcode, 'Huntington', 'Franconia-Springfield')\n  ```\nReturns a list of times until train departures from the given station in the given direction.\n\n=====\nTo get travel time needed to travel from one station to another\n```python\n  startStationCode = 'F01' #Gallery place metro\n  endStationCode = 'A04' #Woodley Park metro\n  \n  totalTravelTime = getTravelTime(self, startStationCode, endStationCode)\n```\nReturns an integer that is the total time needed to go from one station to the next.\n\n=====\nTo get a path from one station to another \n```python\n  startStationCode = 'F01' #Gallery place metro\n  startStationName = 'Gallery Place'\n  \n  endStationCode = 'A04' #Woodley Park metro\n  endStationName = 'Woodley'\n  \n  stopsAlongPath = getPath(startStationCode, endStationCode)\n  stopsAlongPath = getPath(startStationName, endStationName)\n````\nReturns a list of station names along the path with transfers specified by (Transfer towards $station)\n\n====\nTo get a human readable  path from one station to another\n```python\n  startStationCode = 'F01' #Gallery place metro\n  startStationName = 'Gallery Place'\n  \n  endStationCode = 'A04' #Woodley Park metro\n  endStationName = 'Woodley'\n  \n  pathDescription = getPathHumanReadable(startStationCode, endStationCode)\n  pathDescription = getPathHumanReadable(startStationName, endStationName)\n```\nReturns a string that is a human readable description of the path including transfer directions.\n\n====\nTo get a station code for a given station\n```python\n  stationName = 'Woodley'\n  \n  stationCode = getStationcode(stationName)\n````\nReturns either a station code or None.\n\n====\nTo get a station name for a given station code\n```python\n  stationCode = 'A04'\n  \n  stationName = getStationName(stationCode)\n```\nReturns either a station name or None. \n\n====\nTo get a station close to a location\n```python\n  lat = '38.8522750'\n  lon = '-77.0423126'\n  \n  nearestStationCode = getNearestStation(lat, lon)\n```\nReturns the closest stationcode to the supplied location.\n\n====\nTo check if their is an escalator or elevator problem at a station\n```python\n  stationCode = 'C13'\n  \n  elevatorsAndEscalatorsIncident = getElevatorEscalatorIncidentsAtStation(stationCode)\n```\nReturns True if there is an elevator or escalator outage and False if there is not.\n\n====\nTo get the direction of the train you need to take between two stations\n```python\n  startStationCode = 'F01'\n  endStationCode = 'C13'\n  \n  possibleDirections = getDirections(startStationCode, endStationCode)\n```\nReturns an array of the possible directions you can take.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddworken%2Fpywmata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddworken%2Fpywmata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddworken%2Fpywmata/lists"}