initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/python
|
||||
|
||||
|
||||
import csv
|
||||
from pathlib import Path
|
||||
|
||||
from src.models import B4wExport
|
||||
|
||||
|
||||
def reader_raw(path: Path):
|
||||
with path.open() as fid:
|
||||
return list(csv.DictReader(fid))
|
||||
|
||||
def reader_b4w(path: Path):
|
||||
raw = reader_raw(path)
|
||||
return list(map(B4wExport.from_dict, raw))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user