{"id":34075720,"url":"https://github.com/zaanposni/vvspy","last_synced_at":"2025-12-14T09:58:04.903Z","repository":{"id":39705490,"uuid":"185136771","full_name":"zaanposni/vvspy","owner":"zaanposni","description":"simple python module for the VVS and SSB API (Verkehrsverbund Stuttgart)","archived":false,"fork":false,"pushed_at":"2025-06-18T18:51:09.000Z","size":1393,"stargazers_count":53,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T15:48:36.694Z","etag":null,"topics":["departures","efa","json","python","python-library","rest","ssb","ssb-ag","stations","stuttgart","trips","vvs","vvs-api","vvspy","wrapper"],"latest_commit_sha":null,"homepage":"","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/zaanposni.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-06T06:29:25.000Z","updated_at":"2025-09-18T10:46:24.000Z","dependencies_parsed_at":"2024-05-21T20:04:38.981Z","dependency_job_id":"8d450a9b-d63d-471c-88a3-7bc5c62df33c","html_url":"https://github.com/zaanposni/vvspy","commit_stats":null,"previous_names":["fi18-trainees/vvspy"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/zaanposni/vvspy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fvvspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fvvspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fvvspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fvvspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaanposni","download_url":"https://codeload.github.com/zaanposni/vvspy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaanposni%2Fvvspy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27725778,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["departures","efa","json","python","python-library","rest","ssb","ssb-ag","stations","stuttgart","trips","vvs","vvs-api","vvspy","wrapper"],"created_at":"2025-12-14T09:58:04.286Z","updated_at":"2025-12-14T09:58:04.898Z","avatar_url":"https://github.com/zaanposni.png","language":"Python","funding_links":["https://ko-fi.com/zaanposni"],"categories":[],"sub_categories":[],"readme":"# 🚂 VVS API Wrapper\n\n[![PackageVersion][package_version_img]][package_version_img]\n[![PythonVersions][python_versions_img]][python_versions_img]\n[![License][repo_license_img]][repo_license_url]\n\n**Fully object-oriented library** to integrate the **VVS API** into your project.\n\n## Installation\n\n```bash\npip install vvspy\n```\n\n## Examples\n\n\u003e [!TIP]\n\u003e For optimal performance on low-spec hardware such as Raspberry Pi, it is advisable to use the string values of the enum directly to avoid the overhead associated with loading the full enum.\n\n- Detect delay in upcoming departures:\n\n```python\nfrom vvspy import get_departures\nfrom vvspy.enums import Station\n\ndeps = get_departures(Station.HAUPTBAHNHOF__TIEF, limit=3)\nfor dep in deps:\n    if dep.delay \u003e 0:\n        print(\"Alarm! Delay detected.\")\n        print(dep)  # [Delayed] [11:47] [RB17]: Stuttgart Hauptbahnhof (oben) - Pforzheim Hauptbahnhof\n\n    else:\n        print(\"Train on time\")\n        print(dep)  # [11:47] [RB17]: Stuttgart Hauptbahnhof (oben) - Pforzheim Hauptbahnhof\n```\n\n- Detect cancellations in upcoming departures/arrivals:\n\n```python\nfrom vvspy import get_departures\nfrom vvspy.enums import Station\n\narrivals = get_departures(Station.VAIHINGEN, limit=5)\n\nfor arrival in arrivals:\n    if arrival.cancelled:\n        print(f\"Alarm! The train at {arrival.real_datetime} has been cancelled!\")\n        # Check arrival.stop_infos and arrival.line_infos for more information\n```\n\n- Get complete trip info between two stations (including interchanges):\n\n```python\nfrom vvspy import get_trip  # also usable: get_trips\nfrom vvspy.enums import Station\n\ntrip = get_trip(Station.HAUPTBAHNHOF__TIEF, Station.HARDTLINDE)\n\nprint(f\"Duration: {trip.duration / 60} minutes\")\nfor connection in trip.connections:\n    print(f\"From: {connection.origin.name} - To: {connection.destination.name}\")\n```\n\n```text\n# Output:\nDuration: 58 minutes\nFrom: Hauptbf (Arnulf-Klett-Platz) - To: Stuttgart Hauptbahnhof (tief)\nFrom: Stuttgart Hauptbahnhof (tief) - To: Marbach (N)\nFrom: Marbach (N) Bf - To: Murr Hardtlinde\n```\n\n- Filter for specific lines:\n\n```python\nfrom vvspy import get_departures\nfrom vvspy.enums import Station\n\ndeps = get_departures(Station.HAUPTBAHNHOF__TIEF)\nfor dep in deps:\n    if dep.serving_line.symbol == \"S4\":\n        print(f\"Departure of S4 at {dep.real_datetime}\")\n```\n\n- Filter for specific platforms:\n\n```python\nfrom vvspy import get_departures\nfrom vvspy.enums import Station\n\ndeps = get_departures(Station.HAUPTBAHNHOF__TIEF)\nfor dep in deps:\n    if dep.platform == \"101\":\n        print(f\"Departure of {dep.serving_line.number} to {dep.serving_line.direction} on {dep.platform_name} at {dep.real_datetime}\")\n```\n\n### Get your station id\n\nSee: [#64][station_id_issue_url]\n\n### Logging\n\nvvspy uses the python logging module. If you want to change the log level of vvspy, use the following:\n\n```python\nimport logging\n\nlogging.basicConfig(level=logging.INFO)\nlogger = logging.getLogger(\"vvspy\")\nlogger.setLevel(logging.DEBUG)\n```\n\n## ⭐️ Project assistance\n\nIf you want to say **thank you** or/and support active development of `vvspy`:\n\n- Add a [GitHub Star][repo_url] to the project.\n- Support me on [Ko-fi][kofi_url].\n\n## 👀 Projects using vvspy\n\n- [vvs_direct_connect][vvs_direct_connect_url] is a dockerized REST service providing departure data by aschuma.\n\n## 🔥 Other projects of the authors\n\n- [discord-masz][discord_masz_url] - MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.\n\n## ⚠️ License\n\n[vvspy][repo_url] is free and open-source software licensed under\nthe [MIT][repo_license_url].\n\n\u003c!-- Repository --\u003e\n\n[repo_url]: https://github.com/zaanposni/vvspy\n[repo_issues_url]: https://github.com/zaanposni/vvspy/issues\n[repo_pull_request_url]: https://github.com/zaanposni/vvspy/pulls\n[repo_license_url]: https://github.com/zaanposni/vvspy/blob/master/LICENSE\n[repo_license_img]: https://img.shields.io/badge/license-MIT-red?style=for-the-badge\u0026logo=none\n\n[python_versions_img]: https://img.shields.io/pypi/pyversions/vvspy?style=for-the-badge\n[package_version_img]: https://img.shields.io/pypi/v/vvspy?style=for-the-badge\n\n[station_id_issue_url]: https://github.com/zaanposni/vvspy/issues/64\n\n\u003c!-- Author --\u003e\n\n[kofi_url]: https://ko-fi.com/zaanposni\n[discord_masz_url]: https://github.com/zaanposni/discord-masz\n[mail_url]: mailto:vvspy@zaanposni.com\n[discord_url]: https://discord.com\n\n\u003c!-- Projects --\u003e\n\n[vvs_direct_connect_url]: https://github.com/aschuma/vvs_direct_connect\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaanposni%2Fvvspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaanposni%2Fvvspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaanposni%2Fvvspy/lists"}