Unanswered
Hi All, Is There A Clean Way To Check If A Local Trains-Server Is Available? I Want To Set A Condition Weather To Set To Offline Mode Or Not. Thanks
In your Python script, you can use something like:
` import requests
from trains.backend_api import Session
server_available = requests.get(Session.get_api_server_host() + "/debug.ping").ok() `
169 Views
0
Answers
4 years ago
one year ago