-
Notifications
You must be signed in to change notification settings - Fork 29
TASK: Add method to save a Person to a file #152
Copy link
Copy link
Open
Labels
continuationContinued or extended from a previous task/PR/issueContinued or extended from a previous task/PR/issuefeatureNew feature or enhancementNew feature or enhancementgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtaskThis is a task issue / PR completing a taskThis is a task issue / PR completing a task🐜 Lower IntermediateGood for growing devs with some confidence in programmingGood for growing devs with some confidence in programming🦟 IntermediateGood for growing devs who've been coding for a whileGood for growing devs who've been coding for a while
Description
Metadata
Metadata
Assignees
Labels
continuationContinued or extended from a previous task/PR/issueContinued or extended from a previous task/PR/issuefeatureNew feature or enhancementNew feature or enhancementgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtaskThis is a task issue / PR completing a taskThis is a task issue / PR completing a task🐜 Lower IntermediateGood for growing devs with some confidence in programmingGood for growing devs with some confidence in programming🦟 IntermediateGood for growing devs who've been coding for a whileGood for growing devs who've been coding for a while
Leave a comment if you want to work on this task!
*This task is an extension of task #142. You can wait for that one to be completed and merged first, or take/help complete the task.
Difficulty: Lower Intermediate to Intermediate
TODO:
save_to_file()in thePersonclass inperson.py. It's goal is to save a serialized copy of thePersoninstance as JSON data.pathparameter of typePath(frompathlib), and acreateparameter of typeboolwhich defaults toTrue.Pathshould have a.jsonextension. If it doesn't, append it to the file name.createisTrue, the file is created if it does not exist. An error is raised iscreateisFalseand the file does not exist yet.load_from_fileclassmethod to do the opposite (without thecreateparameter and returns aPerson). If the assignee of task 142 did not make afrom_json()method, you don't have to do this.PR steps:
feature/person-save-to-fileTASK: Add method to save a `Person` to a file (#152)Closes #152Please make sure you have read the Contributing Guidelines before working.
Feel free to ask any questions here!
If you are interested in working on this task, please leave a comment requesting assignment to explicitly let others know the task is taken and prevent duplicate PRs.