Link: https://gitlab.com/__muditj__/gmail-cli-automation-tool
So I was given an assignment task for hiring and I ended up rushing through it a little so I didnt do so well. The task was: Given a rules.json file which defines certain filters for emails based on different fields like From, Subject, Content etc, filter out the emails which obey the rules and apply the specified actions on them. This is a CLI application where I make use of OAuth2 to authenticate with Google’s Gmail API
I am aware that there are excessive print statements and I dont have any unit tests added but apart from this, in what other ways can I improve the codebase? In particular, I want to know what would be the ideal way to package this application. This was meant to be a CLI application which should be runnable as a script so I have two particular Python files with a “if __name__ == “__main__” block inside them. One is to authenticate with Google OAuth and get the access and refresh token and the other is to run the main part of the application which does the filtering of the emails and applies the specified actions.
submitted by /u/GrizzyLizz
[link] [comments]
r/learnpython Link: https://gitlab.com/__muditj__/gmail-cli-automation-tool So I was given an assignment task for hiring and I ended up rushing through it a little so I didnt do so well. The task was: Given a rules.json file which defines certain filters for emails based on different fields like From, Subject, Content etc, filter out the emails which obey the rules and apply the specified actions on them. This is a CLI application where I make use of OAuth2 to authenticate with Google’s Gmail API I am aware that there are excessive print statements and I dont have any unit tests added but apart from this, in what other ways can I improve the codebase? In particular, I want to know what would be the ideal way to package this application. This was meant to be a CLI application which should be runnable as a script so I have two particular Python files with a “if __name__ == “__main__” block inside them. One is to authenticate with Google OAuth and get the access and refresh token and the other is to run the main part of the application which does the filtering of the emails and applies the specified actions. submitted by /u/GrizzyLizz [link] [comments]
Link: https://gitlab.com/__muditj__/gmail-cli-automation-tool
So I was given an assignment task for hiring and I ended up rushing through it a little so I didnt do so well. The task was: Given a rules.json file which defines certain filters for emails based on different fields like From, Subject, Content etc, filter out the emails which obey the rules and apply the specified actions on them. This is a CLI application where I make use of OAuth2 to authenticate with Google’s Gmail API
I am aware that there are excessive print statements and I dont have any unit tests added but apart from this, in what other ways can I improve the codebase? In particular, I want to know what would be the ideal way to package this application. This was meant to be a CLI application which should be runnable as a script so I have two particular Python files with a “if __name__ == “__main__” block inside them. One is to authenticate with Google OAuth and get the access and refresh token and the other is to run the main part of the application which does the filtering of the emails and applies the specified actions.
submitted by /u/GrizzyLizz
[link] [comments]