Пример #1
0
def updatedb():
    schedule = pygtfs.Schedule("database.db")
    r = requests.get(
        "https://sncb-opendata.hafas.de/gtfs/static/c21ac6758dd25af84cca5b707f3cb3de",
        allow_redirects=True)
    with open('rawdata.zip', 'wb') as f:
        f.write(r.content)
    pygtfs.overwrite_feed(schedule, "rawdata.zip")
    return "ok"
Пример #2
0
 def setUp(self):
     self.schedule = Schedule(":memory:")
     data_location = os.path.join(os.path.dirname(__file__),
                                  "data", "sample_feed")
     overwrite_feed(self.schedule, data_location)
Пример #3
0
 def setUp(self):
     self.schedule = Schedule(":memory:")
     overwrite_feed(self.schedule, "test/data/sample-feed.zip")
Пример #4
0
 def setUp(self):
   self.schedule = Schedule(":memory:")
   overwrite_feed(self.schedule, "test/data/sample-feed.zip" )
Пример #5
0
 def setUp(self):
     self.schedule = Schedule(":memory:")
     data_location = os.path.join(os.path.dirname(__file__), "data",
                                  "sample_feed")
     overwrite_feed(self.schedule, data_location)