VVSPY Models¶
Departures¶
-
class
vvspy.obj.
Departure
¶ - Departure object from a departure request of one station.
- raw
dict
- Raw dict received by the API.
- stop_id
str
- Station_id of the departure.
- x
str
- Coordinates of the station.
- y
str
- Coordinates of the station.
- map_name
str
- Map name the API works on.
- area
str
- The area of the station (unsure atm)
- platform
str
- Platform / track of the departure.
- platform_name
str
- name of the platform.
- stop_name
str
- name of the station.
- name_wo
str
- name of the station.
- countdown
int
- minutes until departure.
- datetime
datetime.datetime
- Planned departure datetime.
- real_datetime
datetime.datetime
- Estimated departure datetime (equal to
self.datetime
if no realtime data is available). - delay
int
- Delay of departure in minutes.
- serving_line
ServingLine
- line of the incoming departure.
- operator
LineOperator
- Operator of the incoming departure.
- stop_infos: Optional[
dict
] - All related info to the station (e.g. maintenance work).
- line_infos Optional[
dict
] - All related info to the station (e.g. maintenance work).
- raw
Arrivals¶
-
class
vvspy.obj.
Arrival
¶ Arrival object from a arrival request of one station.
- raw
dict
- Raw dict received by the API.
- stop_id
str
- Station_id of the arrival.
- x
str
- Coordinates of the station.
- y
str
- Coordinates of the station.
- map_name
str
- Map name the API works on.
- area
str
- The area of the station (unsure atm)
- platform
str
- Platform / track of the arrival.
- platform_name
str
- name of the platform.
- stop_name
str
- name of the station.
- name_wo
str
- name of the station.
- countdown
int
- minutes until arrival.
- datetime
datetime.datetime
- Planned arrival datetime.
- real_datetime
datetime.datetime
- Estimated arrival datetime (equal to
self.datetime
if no realtime data is available). - delay
int
- Delay of arrival in minutes.
- serving_line
ServingLine
- line of the incoming arrival.
- operator
LineOperator
- Operator of the incoming arrival.
- stop_infos Optional[
dict
] - All related info to the station (e.g. maintenance work).
- line_infos Optional[
dict
] - All related info to the station (e.g. maintenance work).
- raw
Trips¶
-
class
vvspy.obj.
Trip
¶ Result object from a trip request from one station to another including interchanges
- raw
dict
- Raw dict received by the API.
- connections List[
Connection
] - List of connections the trip consists of.
- duration
int
- seconds the trip takes overall.
- zones Optional[List[
str
]] - List of zones this trip goes through.
- fare Optional[
dict
] - misc info about this trip, ticket prices, etc.
- raw
Connection¶
-
class
vvspy.obj.
Connection
¶ Several connections describe one
Trip
.- raw
dict
- Raw dict received by the API.
- duration
int
- seconds this connection takes
- is_realtime_controlled
bool
- whether or not this connection has realtime tracking
- origin
Origin
- Origin, where this connection starts
- destination
Destination
- Where this connection is heading to
- transportation
Transportation
- Transportation info of this connection
- stop_sequence Optional[List[
dict
]] - stop sequence of this connection
- foot_path_info Optional[]
- Info if you really want to walk ?
- infos Optional[List[]]
- ~
- coords Optional[List[List[
int
]]] - coords of this connection
- path_description Optional[]
- ~
- interchange Optional[]
- ~
- properties Optional[
dict
] - misc info about this connection
- raw
Origin¶
-
class
vvspy.obj.
Origin
¶ Describes the origin of a
Connection
.- raw
dict
- Raw dict received by the API.
- is_global_id
bool
- ~
- id
str
- station id of the origin station
- name
str
- name of the origin station
- disassembled_name Optional[
str
] - detailed name of the origin station.
- type
str
- type of the origin station. (e.g. bus, track)
- point_type Optional[
str
] - ~
- coord List[
int
] - coords of the station
- niveau
int
- ~
- parent
dict
- ~
- departure_time_planned
datetime.datetime
- Time planned of arrival.
- departure_time_estimated
datetime.datetime
- Time estimated with realtime info (same as departure_time_planned if no realtime data is available).
- delay
int
- Minutes of delay.
- properties
dict
- misc info about the origin.
- raw
Destination¶
-
class
vvspy.obj.
Destination
¶ Describes the destination of a
Connection
.- raw
dict
- Raw dict received by the API.
- is_global_id
bool
- ~
- id
str
- station id of the destination station
- name
str
- name of the destination station
- disassembled_name Optional[
str
] - detailed name of the destination station.
- type
str
- type of the destination station. (e.g. bus, track)
- point_type Optional[
str
] - ~
- coord List[
int
] - coords of the station
- niveau
int
- ~
- parent
dict
- ~
- arrival_time_planned
datetime.datetime
- Time planned of arrival.
- arrival_time_estimated
datetime.datetime
- Time estimated with realtime info (same as arrival_time_planned if no realtime data is available).
- delay
int
- Minutes of delay.
- properties
dict
- misc info about the destination.
- raw
Transportation¶
-
class
vvspy.obj.
Transportation
¶ Describes info about transportation of a
Connection
.- raw
dict
- Raw dict received by the API.
- id
str
- id of the transportation.
- name
str
- name of the transportation.
- disassembled_name
str
- detailed name of the transportation.
- number
str
- line number of the transportation.
- description
str
- description, most of the time the string that is displayed on the bus/train itself.
- product
dict
- describes the mean of transport (bus, train, etc.)
- operator
LineOperator
- describes the Operator of the transport.
- destination
dict
- destination of the transport.
- properties
dict
- misc info about the transport.
- raw
ServingLine¶
-
class
vvspy.obj.
ServingLine
¶ Describes the line, departing or arriving in a Departure/Arrival result.
- raw
dict
- Raw dict received by the API.
- key
str
- key (most likely an ID) of the line.
- code
str
- code (most likely type) of the line.
- number
str
- number of line (e.g. U12).
- symbol
str
- symbol displayed on the transport itself (e.g. U12).
- mot_type
str
- ~
- mt_sub_code
str
- ~
- real_time
bool
- whether or not the transport supports realtime tracking.
- direction
str
- Last station the transport is heading to.
- direction
str
- Last station the transport is heading to.
- direction_from
str
- Starting station of the transport.
- name
str
- name of the line type (e.g. Stadtbahn).
- train_num
str
- Last station the transport is heading to.
- delay Optional[
str
] - Minutes of delay.
- li_erg_ri_proj
dict
- Detailed line information (e.g. network)
- dest_id
str
- station id of the destination
- stateless
str
- ~
- raw
LineOperator¶
-
class
vvspy.obj.
LineOperator
¶ Describes the operator of a
Connection
.- raw
dict
- Raw dict received by the API.
- id
str
- id of the operator.
- name
str
- display name of the operator.
- public_code
str
- public_code of the operator.
- raw