for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import csv
from StringIO import StringIO
from st2actions.runners.pythonrunner import Action
__all__ = [
'ParseCSVAction'
]
class ParseCSVAction(Action):
def run(self, data, delimiter=',', quote_char='"'):
fh = StringIO(data)
reader = csv.reader(fh, delimiter=str(delimiter), quotechar=str(quote_char))
result = []
for row in reader:
result.append(row)
return result