Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from DatasourceDriverTemplate import Driver as TemplateDriver
- import csv
- class Driver(TemplateDriver):
- def __init__(self, args):
- self.data = dict()
- if len(args)>0:
- csv_file_location = args[0]
- with open(csv_file_location) as csv_file:
- csv_reader = csv.reader(csv_file)
- for row in csv_reader:
- self.data[row[0]] = [row[1], row[2]]
- def get(self, args):
- return self.data[args[0]]
Advertisement
Add Comment
Please, Sign In to add comment