easy_time_tracker.util package

Submodules

easy_time_tracker.util.file_read_write module

Utils for reading and writing files

easy_time_tracker.util.file_read_write.check_if_current_file_exists(path: str) bool[source]

Function to check if a file exists

Parameters

path (String) – The full path to the file name

Return type

Boolean

Returns

True or False

easy_time_tracker.util.file_read_write.delete_current_file(path: str) None[source]

Function to delete a file

Parameters

path (String) – The full path to the file name

Return type

None

Returns

It deletes files

easy_time_tracker.util.file_read_write.read_text_file(path: str) str[source]

Function to read to text file

Parameters

path (String) – The full path to the file name

Return type

String

Returns

The data from the text file

easy_time_tracker.util.file_read_write.write_text_file(path: str, data: str) None[source]

Function to write to text file

Parameters
  • path (String) – The full path to the file name

  • data (String) – The data to write to the file

Return type

None

Returns

It writes files

easy_time_tracker.util.file_read_write.wrtie_excel_file(path: str, data: Any, headers: Collection) None[source]

Function to write to Excel file

Parameters
  • path (String) – The full path to the file name

  • data (Any) – The column data

  • headers (Collection) – The column headers

Return type

None

Returns

It creates Excel

easy_time_tracker.util.schemas module

Data schemas

class easy_time_tracker.util.schemas.CompletedTimeRecordsSchema(*, records: List[EndTimeRecordSchema])[source]

Bases: BaseModel

Class schema for records archive

records: List[EndTimeRecordSchema]
class easy_time_tracker.util.schemas.EndTimeRecordSchema(*, description: str, people: list, project: str = 'na', time_zone: str, start_time: str, end_time: str, ending_comments: str = 'no comments added', total_time_worked: str)[source]

Bases: StartTimeRecordSchema

Class schema to end a record

end_time: str
ending_comments: Optional[str]
total_time_worked: str
class easy_time_tracker.util.schemas.StartTimeRecordSchema(*, description: str, people: list, project: str = 'na', time_zone: str, start_time: str)[source]

Bases: BaseModel

Class schema to start a record

description: str
people: list
project: Optional[str]
start_time: str
time_zone: str

Module contents

init for util