Skip to main content

Simple Python client for the HVV Geofox GTI API

Project description

HVV API Client

Eine einfache Python-Library für die HVV Geofox GTI API.

Installation

uv sync

Verwendung

from hvv_client import HVVClient

# Client initialisieren
client = HVVClient(
    username="DEIN_USERNAME",
    password="DEIN_PASSWORD"
)

# Systeminformationen abrufen
info = client.init()
print(info)

# Station suchen
result = client.check_name("Hauptbahnhof", "STATION", max_list=5)
station = result['results'][0]

# Abfahrten abrufen
departures = client.departure_list(station, max_list=10)
for dep in departures['departures']:
    print(f"{dep['line']['name']}{dep['line']['direction']}")

# Route berechnen
start = client.check_name("Hauptbahnhof", "STATION", 1)['results'][0]
dest = client.check_name("Altona", "STATION", 1)['results'][0]
route = client.get_route(start, dest)

Verfügbare Methoden

init()

Systeminformationen und Fahrplangültigkeit abrufen.

check_name(name, type_="STATION", max_list=10)

Stationen, Adressen oder POIs suchen.

  • type_: "STATION", "ADDRESS", "POI", "UNKNOWN"

get_route(start, dest, time=None)

Route zwischen zwei Orten berechnen.

  • start, dest: Station-Objekte von check_name()
  • time: Optional {"date": "heute", "time": "jetzt"}

departure_list(station, max_list=10, time=None)

Abfahrten einer Haltestelle abrufen.

  • station: Station-Objekt von check_name()
  • time: Optional {"date": "heute", "time": "jetzt"}

departure_course(departure_id)

Verlauf einer Fahrt abrufen.

list_stations(data_id=None)

Alle Haltestellen auflisten.

list_lines(data_id=None)

Alle Linien auflisten.

get_announcements()

Aktuelle Bekanntmachungen und Störungen.

check_postal_code(postal_code)

Prüfen, ob PLZ im HVV-Gebiet liegt.

get_station_information(station)

Zusätzliche Informationen zu einer Haltestelle.

tariff_meta_data()

Tarif-Metadaten abrufen.

tariff_zone_neighbours()

Nachbarzonen von Tarifzonen.

ticket_list()

Liste aller verfügbaren Tickets.

get_vehicle_map(bbox)

Fahrzeugpositionen in einem Bereich.

  • bbox: Bounding Box als Dictionary

Beispiel

Siehe example.py für ein vollständiges Beispiel.

API-Dokumentation

Die vollständige API-Dokumentation findest du in manuals/manual.md und manuals/openapi.json.

Authentifizierung

Die API verwendet HMAC-SHA1-Authentifizierung. Du benötigst einen Benutzernamen und ein Passwort von HBT GmbH.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hvvapi-0.1.0.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hvvapi-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file hvvapi-0.1.0.tar.gz.

File metadata

  • Download URL: hvvapi-0.1.0.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for hvvapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8baa44d36bdd0c48744d0cec21d52585698059c046378d8bc83ffb9272294726
MD5 c49ed47b82d488c2399ca3308982ecbf
BLAKE2b-256 4238506d9414e4d3b43d301f7533f8375001abcd44ad3496a80d8402b7f046c8

See more details on using hashes here.

File details

Details for the file hvvapi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hvvapi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for hvvapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95d3a9f51855468881b01add2c7d8c88bb290a779f1c2b8dfdb479fff79a8b43
MD5 70ea1866505ef9d80cd274bf9c5fd5da
BLAKE2b-256 560a447d9e14cef37f1625e0437c54883266ca421ce18a1fa599da51b0aa52f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page