Parser

class Entry

A class that holds data for an entry in the diary. One day can have multiple entries.

datetime: datetime.datetime
mood: Mood
activities: List[str]
notes: str
class Parser(config=None)

Parser for the CSV file. If config is not provided, a default one will be created.

Parameters:

config (MoodConfig) – MoodConfig for the parser

load_csv(path) List[Entry]

Load entries from a CSV file.

Parameters:

path (str) – Path to the CSV file

load_from_buffer(f) List[Entry]

Load entries from a file like object containing CSV data.

Parameters:

f – A file-like object