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"
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)
def setUp(self): self.schedule = Schedule(":memory:") overwrite_feed(self.schedule, "test/data/sample-feed.zip")
def setUp(self): self.schedule = Schedule(":memory:") overwrite_feed(self.schedule, "test/data/sample-feed.zip" )