release v0.3: Use classes and separate source files into folders
Clean Design
In the previous version I did not use classes. The design is now much clearer:
pw_command.py
-> Execute this script from the command line; The control flow is now way easier to read; Instead of calling functions the script calls methods from the new class PasswordCommand
;
pw/pw_json_client.py
-> Serves as the "backend" that handles all reads and writes to the json file that holds the data
crypto/pw_encryption.py
-> Handles everything related to encryption
The main function used to mix different classes. The classes were coupled. Now they are loose and independent.
Clean Code
In the past few months I have studied Clean Code and this release reflects what I have learned so far. For example: The main()
function is at the top of the script and is executed at the bottom of the script. Functionality is extracted into separate functions. Each function is one layer of abstraction. The order of the functions follow the order of the calls in main()
.