You work for an online fruit store, and you need to develop a system that will update the catalog information with data provided by your suppliers. When each supplier has new products for your store, they give you an image and a description of each product.
Given a bunch of images and descriptions of each of the new products, you’ll:
- Upload the new products to your online store. Images and descriptions should be uploaded separately, using two different web endpoints.
- Send a report back to the supplier, letting them know what you imported.
Since this process is key to your business's success, you need to make sure that it keeps running! So, you’ll also:
- Run a script on your web server to monitor system health.
- Send an email with an alert if the server is ever unhealthy.
- Python Image Library (PIL) - Tutorial
- Requests (HTTP client library) - Quickstart
- ReportLab (PDF creation library)
- email (constructing email)
- psutil (processes and system utilization)
- shutil (file operations)
- smtplib (sending email)
- chanageImage.py - It will resize and change the image format from .tiff to .jpeg
- emails.py - sends email to recipient
- health_check.py - it checks the system health every hour and sends email about the shortage of resources or any specified error accurs
- run.py - uploads the descriptions about the images to webserver
- reports.py - it creates the report about the description about the images in pdf form to the given directory
- supplier_image_upload.py - it uploads the iamges to the webserver