Miksus / red-bird

Repository Patterns for Python
https://red-bird.readthedocs.io
MIT License
163 stars 22 forks source link

fix: if CSV does not exists and it is read #29

Closed Miksus closed 2 years ago

Miksus commented 2 years ago

Now the CSV is created instead of raising an error.

This does not throw error if the CSV file does not exists:

from redbird.repos import CSVFileRepo

repo = CSVFileRepo(filename="myfile.csv", fieldnames=["name", "age", "color"])

repo.filter_by().all() # Previously gave an error

Instead, the file is created.