Unofficial Python API using by transilien.com
Install the environment
pip install -r requirements.txt
Get the next trains:
python app.py trains "GARE DE PARIS AUSTERLITZ" "JUVISY"
Search for a place
python app.py search "paris"
Look for the next trains at a station
from models.trip import Trip
trip = Trip.next_trains("GARE DE PARIS AUSTERLITZ")
Trip object attributes are:
trip.platformAvailable
(boolean): ?trip.disruptionsAvailable
(boolean): ?trip.arrivalTimeAvailable
(boolean): ?trip.nextTrainsList
(list[Train]): List of the next trainstrip.departureStopArea
(dict}): Details about departure stationtrip.arrivalStopArea
(obj): Details about arrival station
Search for a place
from models.station import Station
for place in Station.search_list_places("chatelet"):
print(place['name'])
Place object attributes are:
place.id
(string): idplace.placeType
(string): ?place.name
(string): Place nameplace.shortName
(string): Station nameplace.coord
(dict{lat, lon}): Geographic coordinateplace.train
(boolean): is there trainsplace.bus
(boolean): is there busplace.rer
(boolean): is there RERplace.tramway
(boolean): is there tramwayplace.metro
(boolean): is there metroplace.navette
(boolean): is there shuttle bus
Get more information about a station
from models.station import Station
station = Station.find_station("GARE DE PARIS AUSTERLITZ")
Station object attributes are:
- label (string): Station name
- value (?): ?
- coordonneeX (?): ?
- coordonneeY (?): ?
- name (?): ?
- typeRue (?): ?
- city (?): ?
- coordLambertX (?): ?
- coordLambertY (?): ?
- uic (string): UIC
- train (boolean): is there trains
- rer (boolean): is there RER
- tramway (boolean): is there tramway
- metro (boolean): is there metro
- bateau (boolean): is there boat
- navette (boolean): is there shuttle bus
- bus (boolean): is there bus
- stopPoint (?): ?
- ratp (boolean): is it RATP
- sncf (boolean): is it SNCF
- keywords (List[string]): other names
- tempsReel (boolean): is it real time
- lignes (boolean): ?
- entryPointType (?): ?
Train object attributes are:
- modeTransportEnum (string)
- lineTransportEnum (string)
- typeTrain (string)
- codeMission (string)
- canceled (boolean)
- delayed (boolean)
- departureTime (string)
- arrivalTime (string)
- destinationMission (string)
- platform (string)
- deservedStations (List[dict{label, time}])
- hastringaficDisruption (boolean)
- hastringavauxDisruption (boolean)
- disruptions (List[Disruption])
Disruption object attributes are:
- id (string): ?
- creationDate (string): creation date of the disruption
- updateDate (string): update date of the disruption
- title (string): title
- type (string): disruption type
- validityPeriods (List[dict{startDate, endDate, now}]): period when there is the disruption
- detail (string): detail in HTML
- startingApplicationDate (string): disruption begin
- hasSubstitutionBus (boolean): is there some substitution bus
- line (string): Line detail
- transport (string): ?
More informations on swagger.yml