Email bot Python
Budget: ₹100 – ₹400 INR
ou need to create a bot that polls various email service providers like Gmail & Outlook at regular intervals, and fetches the latest attachments inside them.
I'm planning on using both, IMAP and OAuth to fetch the attachments from the above mentioned email providers. So, you need to create a BotFactory Class in python, to initialize new instances of these bots which might use either Oauth or IMAP based on the passed configuration into it.
Example: I should be able to spawn a Gmail bot via IMAP or Oauth method. I just need to pass the configuration when initializing the bot like Email, Password, ClientID, ClientSecret etc or whatever is required for that method(IMAP/OAuth).
The spawned email bot shall only download the latest unique attachments with meta data like File Size, File Type, TimeStamp etc. Please stream the file into disk instead of downloading it directly to optimize memory footprints. When the download is complete, notify method should be there to receive notifications.
Also, create a bot monitoring class to monitor spawned and running bots with bot IDs, Bot Type, Current Status. The bots should have proper logging statements and error handling methods.
Please write unit test cases with proper mocks for all the functions that you create.You might use PyTest for the test cases. Code Coverage should be greater than 70%.
I'm planning on using both, IMAP and OAuth to fetch the attachments from the above mentioned email providers. So, you need to create a BotFactory Class in python, to initialize new instances of these bots which might use either Oauth or IMAP based on the passed configuration into it.
Example: I should be able to spawn a Gmail bot via IMAP or Oauth method. I just need to pass the configuration when initializing the bot like Email, Password, ClientID, ClientSecret etc or whatever is required for that method(IMAP/OAuth).
The spawned email bot shall only download the latest unique attachments with meta data like File Size, File Type, TimeStamp etc. Please stream the file into disk instead of downloading it directly to optimize memory footprints. When the download is complete, notify method should be there to receive notifications.
Also, create a bot monitoring class to monitor spawned and running bots with bot IDs, Bot Type, Current Status. The bots should have proper logging statements and error handling methods.
Please write unit test cases with proper mocks for all the functions that you create.You might use PyTest for the test cases. Code Coverage should be greater than 70%.