{"id":18174829,"url":"https://github.com/kylebarron/transitland_wrapper","last_synced_at":"2025-07-19T23:34:01.695Z","repository":{"id":57476931,"uuid":"239169061","full_name":"kylebarron/transitland_wrapper","owner":"kylebarron","description":"Python wrapper for transit.land API","archived":false,"fork":false,"pushed_at":"2020-02-24T04:55:10.000Z","size":38,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T23:32:45.456Z","etag":null,"topics":["api","gtfs","gtfs-feed","python","transit","transit-data","transitland"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylebarron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-02-08T16:59:36.000Z","updated_at":"2024-11-11T10:37:18.000Z","dependencies_parsed_at":"2022-09-14T16:41:15.914Z","dependency_job_id":null,"html_url":"https://github.com/kylebarron/transitland_wrapper","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kylebarron/transitland_wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylebarron%2Ftransitland_wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylebarron%2Ftransitland_wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylebarron%2Ftransitland_wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylebarron%2Ftransitland_wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylebarron","download_url":"https://codeload.github.com/kylebarron/transitland_wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylebarron%2Ftransitland_wrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266041698,"owners_count":23867944,"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":["api","gtfs","gtfs-feed","python","transit","transit-data","transitland"],"created_at":"2024-11-02T16:07:54.608Z","updated_at":"2025-07-19T23:34:01.647Z","avatar_url":"https://github.com/kylebarron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transit.land API wrapper\n\nSimple Python wrapper around \u003chttps://transit.land\u003e API.\n\n## Install\n\n```\npip install transitland_wrapper\n```\n\n## CLI\n\nAll CLI commands write a list of GeoJSON `Feature`s to stdout. This way minimal\nresults are kept in memory at once. If a `geometry` is passed, the geometry's\nbounding box is given to the transit.land API, and results are tested for\nintersection with the original geometry. The `geometry` file must be readable by\nGeoPandas and will automatically be reprojected to EPSG 4326 if necessary. The\ngeometry type must be either `Point`, `Polygon`, `MultiPolygon`, `LineString`,\nor `MultiLineString`.\n\n### Operators\n\n```\nUsage: transitland operators [OPTIONS]\n\n  Request operators info\n\nOptions:\n  -b, --bbox TEXT             Bounding box to search within\n  -g, --geometry PATH         File with geometry to use. Must be readable by\n                              GeoPandas\n  -r, --radius FLOAT          radius in meters to search around, default 100m\n                              for Point geometries. Used only for Point\n                              geometries.\n  --gtfs-id TEXT              ID used in a GTFS feed's agencies.txt file\n  -p, --per-page INTEGER      Number of results per page  [default: 50]\n  --page-all / --no-page-all  Page over all responses  [default: False]\n  --help                      Show this message and exit.\n```\n\n\n### Routes\n\n```\nUsage: transitland routes [OPTIONS]\n\n  Request routes info\n\nOptions:\n  -b, --bbox TEXT                 Bounding box to search within\n  -g, --geometry PATH             File with geometry to use. Must be readable\n                                  by GeoPandas\n  -r, --radius FLOAT              radius in meters to search around, default\n                                  100m for Point geometries. Used only for\n                                  Point geometries.\n  --operated-by TEXT              search by operator onestop_id or route\n                                  onestop_id\n  --vehicle-type TEXT             find all routes with vehicle type(s) by\n                                  integer or string. Possible values defined\n                                  by the GTFS spec for the route_type column\n                                  and the Extended GTFS Route Types\n  --gtfs-id TEXT                  ID used in a GTFS feed's routes.txt file\n  --include-geometry / --no-include-geometry\n                                  Include route geometry  [default: True]\n  -p, --per-page INTEGER          Number of results per page  [default: 50]\n  --page-all / --no-page-all      Page over all responses  [default: False]\n  --help                          Show this message and exit.\n```\n\n### Stops\n\n```\nUsage: transitland stops [OPTIONS]\n\n  Request stops info\n\nOptions:\n  -b, --bbox TEXT             Bounding box to search within\n  -g, --geometry PATH         File with geometry to use. Must be readable by\n                              GeoPandas\n  -r, --radius FLOAT          radius in meters to search around, default 100m\n                              for Point geometries. Used only for Point\n                              geometries.\n  --served-by TEXT            search by operator onestop_id or route\n                              onestop_id\n  --gtfs-id TEXT              ID used in a GTFS feed's stops.txt file\n  -p, --per-page INTEGER      Number of results per page  [default: 50]\n  --page-all / --no-page-all  Page over all responses  [default: False]\n  --help                      Show this message and exit.\n```\n\n### Route Stop Patterns\n\n```\nUsage: transitland route-stop-patterns [OPTIONS]\n\n  Request routes info\n\nOptions:\n  -b, --bbox TEXT             Bounding box to search within\n  -g, --geometry PATH         File with geometry to use. Must be readable by\n                              GeoPandas\n  --traversed-by TEXT         find all Route Stop Patterns belonging to route\n  --stops-visited TEXT        any one or more stop Onestop IDs, separated by\n                              comma. Finds Route Stop Patterns with\n                              stops_visited in stop_pattern\n  --trips TEXT                any one or more trip ids, separated by comma.\n                              Finds Route Stop Patterns with specified trips\n                              in trips\n  -p, --per-page INTEGER      Number of results per page  [default: 50]\n  --page-all / --no-page-all  Page over all responses  [default: False]\n  --help                      Show this message and exit.\n```\n\n### Schedule Stop Pairs\n\n```\nUsage: transitland schedule-stop-pairs [OPTIONS]\n\n  Request schedule stop pairs info\n\nOptions:\n  -b, --bbox TEXT                 Bounding box to search within\n  -g, --geometry PATH             File with geometry to use. Must be readable\n                                  by GeoPandas\n  --origin-onestop-id TEXT        Find all Schedule Stop Pairs from origin\n  --destination-onestop-id TEXT   Find all Schedule Stop Pairs to a\n                                  destination\n  --date TEXT                     Find all Schedule Stop Pairs from origin on\n                                  date\n  --service-from-date TEXT        Find all Schedule Stop Pairs in effect from\n                                  a date\n  --service-before-date TEXT      Find all Schedule Stop Pairs in effect\n                                  before a date\n  --origin-departure-between TEXT\n                                  Find all Schedule Stop Pairs with\n                                  origin_departure_time in a range\n  --trip TEXT                     Find all Schedule Stop Pairs by trip\n                                  identifier\n  --route-onestop-id TEXT         Find all Schedule Stop Pairs by route\n  --operator-onestop-id TEXT      Find all Schedule Stop Pairs by operator\n  --active / --no-active          Schedule Stop Pairs from active FeedVersions\n                                  [default: True]\n  -p, --per-page INTEGER          Number of results per page  [default: 50]\n  --page-all / --no-page-all      Page over all responses  [default: False]\n  --help                          Show this message and exit.\n```\n\n### Onestop ID\n\n```\nUsage: transitland onestop-id [OPTIONS]\n\n  Request onestop_id info\n\nOptions:\n  --oid TEXT       a Onestop ID for any type of entity (for example, a stop or\n                   an operator)\n  -f, --file PATH  a file with one or more Onestop IDs, with each on their own\n                   line.\n  --help           Show this message and exit.\n```\n\n### Feeds\n\n```\nUsage: transitland feeds [OPTIONS]\n\n  Request feeds info\n\nOptions:\n  -b, --bbox TEXT             Bounding box to search within\n  -g, --geometry PATH         File with geometry to use. Must be readable by\n                              GeoPandas\n  -p, --per-page INTEGER      Number of results per page  [default: 50]\n  --page-all / --no-page-all  Page over all responses  [default: False]\n  --help                      Show this message and exit.\n```\n\n## Python API\n\nEach function returns a _generator_ of results, because there could be an\nunknown amount of paging involved. Each item of the iterator is a list of\nGeoJSON `Feature`s.\n\n```py\nimport transitland_wrapper\ntransitland_wrapper.stops()\ntransitland_wrapper.operators()\ntransitland_wrapper.routes()\ntransitland_wrapper.route_stop_patterns()\ntransitland_wrapper.schedule_stop_pairs()\ntransitland_wrapper.onestop_id()\ntransitland_wrapper.feeds()\n```\n\n### Stops\n\n```\n- geometry: either Point, to search a radius around a point, or a\n  Polygon or MultiPolygon, to search for stops within the geometry. If a\n  Polygon or MultiPolygon is provided, the search will be done by\n  bounding box, and then results will be filtered for intersection.\n- radius: radius in meters to search around, default 100m for Point\n  geometries. Not used for Polygon geometries.\n- served_by: search by operator onestop_id or route onestop_id\n- gtfs_id: ID used in a GTFS feed's stops.txt file\n- per_page: number of results per page, by default 50\n- page_all: page over all responses\n```\n\n### Operators\n\n```\n- geometry: either Point, to search a radius around a point, or a\n  Polygon or MultiPolygon, to search for stops within the geometry. If a\n  Polygon or MultiPolygon is provided, the search will be done by\n  bounding box, and then results will be filtered for intersection.\n- radius: radius in meters to search around, default 100m for Point\n  geometries. Not used for Polygon geometries.\n- gtfs_id: ID used in a GTFS feed's agencies.txt file\n- per_page: number of results per page, by default 50\n- page_all: page over all responses\n```\n\n### Routes\n\n```\n- geometry: either Point, to search a radius around a point, or a\n  Polygon or MultiPolygon, to search for stops within the geometry. If a\n  Polygon or MultiPolygon is provided, the search will be done by\n  bounding box, and then results will be filtered for intersection.\n- radius: radius in meters to search around, default 100m for Point\n  geometries. Not used for Polygon geometries.\n- operated_by: search by operator onestop_id\n- vehicle_type: find all routes with vehicle type(s) by integer or\n  string. Possible values defined by the GTFS spec for the route_type\n  column and the Extended GTFS Route Types.\n- include_geometry: If True, includes route geometry. Default: True\n- gtfs_id: ID used in a GTFS feed's routes.txt file\n- per_page: number of results per page, by default 50\n- page_all: page over all responses\n```\n\n### Route Stop Patterns\n\n```\n- geometry: either Polygon or MultiPolygon, to search for stops within\n  the geometry. If a Polygon or MultiPolygon is provided, the search\n  will be done by bounding box, and then results will be filtered for\n  intersection.\n- traversed_by: find all Route Stop Patterns belonging to route\n- stops_visited: any one or more stop Onestop IDs, separated by comma. Finds Route Stop Patterns with stops_visited in stop_pattern.\n- trips: any one or more trip ids, separated by comma. Finds Route Stop Patterns with specified trips in trips.\n- per_page: number of results per page, by default 50\n- page_all: page over all responses\n```\n\n### Schedule Stop Pairs\n\n```\n- geometry: either Polygon or MultiPolygon, to search for stops within\n  the geometry. If a Polygon or MultiPolygon is provided, the search\n  will be done by bounding box, and then results will be filtered for\n  intersection.\n- origin_onestop_id: Find all Schedule Stop Pairs from origin. Accepts multiple Onestop IDs, separated by commas\n- destination_onestop_id: Find all Schedule Stop Pairs to a destination. Accepts multiple Onestop IDs, separated by commas\n- date: Find all Schedule Stop Pairs from origin on date\n- service_from_date: Find all Schedule Stop Pairs in effect from a date\n- service_before_date: Find all Schedule Stop Pairs in effect before a date\n- origin_departure_between: Find all Schedule Stop Pairs with origin_departure_time in a range\n- trip: Find all Schedule Stop Pairs by trip identifier\n- route_onestop_id: Find all Schedule Stop Pairs by route. Accepts multiple Onestop IDs, separated by commas.\n- operator_onestop_id: Find all Schedule Stop Pairs by operator. Accepts multiple Onestop IDs, separated by commas.\n- active: Schedule Stop Pairs from active FeedVersions\n- per_page: number of results per page, by default 50\n- page_all: page over all responses\n```\n\n### Onestop ID\n\n```\n- oid: a Onestop ID for any type of entity (for example, a stop or an operator)\n```\n\n### Feeds\n\n```\n- geometry: either Polygon or MultiPolygon, to search for stops within\n  the geometry. If a Polygon or MultiPolygon is provided, the search\n  will be done by bounding box, and then results will be filtered for\n  intersection.\n```\n\n## Contributing\n\nTo release to PyPI:\n```\nbumpversion minor\npython setup.py sdist\ntwine upload dist/transitland_wrapper-0.1.0.tar.gz\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylebarron%2Ftransitland_wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylebarron%2Ftransitland_wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylebarron%2Ftransitland_wrapper/lists"}