Models¶
-
class
locomotive.models.journey.
Journey
(segments: Tuple[locomotive.models.journey.Segment, ...], proposals: Tuple[locomotive.models.journey.Proposal, ...])[source]¶ A Train Journey.
-
property
arrival_date
¶
-
property
arrival_station
¶
-
property
departure_date
¶
-
property
departure_station
¶
-
property
duration
¶
-
property
lowest_price
¶ Lowest price for the journey, amongst all proposals.
-
proposals
¶ Journey proposals.
-
segments
¶ Journey segments, from departure to arrival.
-
property
-
class
locomotive.models.journey.
Proposal
(flexibility_level: str, price: money.money.Money)[source]¶ -
-
flexibility_level
¶
-
price
¶
-
-
class
locomotive.models.journey.
Segment
(transport: locomotive.models.journey.Transport, departure_station: locomotive.models.station.Station, arrival_station: locomotive.models.station.Station, departure_date: datetime.datetime, arrival_date: datetime.datetime)[source]¶ -
-
arrival_date
¶
-
arrival_station
¶
-
departure_date
¶
-
departure_station
¶
-
property
duration
¶ Returns the durations of the segment.
-
transport
¶
-