Skip to main content

Tests

IT_Automation Project

IT_Automation_Project is a Python library I wrote to complete the final project in Google's IT automation with Python class.

The library provides basic system monitoring, image processing, PDF file generation, and email generation.

overview

There are 7 modules in this project.

health_checks

This module contains functions for checking if system resources are overloaded and then emailing a error message.

ChangeImage

Functions for converting images in a directory into jpeg images, images can also be resized.

emails

This module contains functions for generating and sending emails. Email attachments are optional.

reports

Functions for generating pdf reports.

report_email

This module is specific to the final assignment but I will in include it here. Generates a pdf report from Google's supplier data. The report is attached to an email message and sent.

Supplier_image_upload

This module is specific to the final assignment but I will in include it here. Makes a post request for every jpeg image in a directory. This script is used for Google's IT_automation class. The directory contains images for every fruit that will be displayed in customers website.

run

This module is specific to the final assignment but I will in include it here. Functions for reading a directory and then making post request with the data. This is used for Google's IT automation class project. Reads a directory with files containing information on fruits and then makes a post request to the class website to show the data.

Installation

Use the package manager pip to install it-automation-martin.

pip install it-automation-martin

Usage

health_checks

from it_automation import health_checks

cpu_percent_usage_threshold = 80
available_disk_space_percent_threshold = 20
memory_threshold = 500 * 1024 * 1024  # 500MB
email_body = 'Please check your system and resolve the issue as soon as possible.'
sender = "test_email@gmail.com"
receiver = "test_email@gmail.com"

health_checks.check_systems(cpu_percent_usage_threshold, 
    available_disk_space_percent_threshold,
    memory_threshold, 
    sender, 
    receiver, 
    email_body)

changeImage

from it_automation import changeImage

image_directory = os.path.expanduser('~') + '/Images'

output_directory = os.path.expanduser('~') + '/Images'
resize_width = 600
resize_height = 400
convert_image(image_directory, resize_width, resize_height, output_directory)

Contributing

Pull requests are welcome.

License

MIT

Release files for it-automation-martin 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for it-automation-martin 1.1.2
File Size Uploaded
it-automation-martin-1.1.2.tar.gz 17.9 MB Details

Release files / it-automation-martin-1.1.2.tar.gz

Download URL it-automation-martin-1.1.2.tar.gz
Size 17.9 MB
Tags Source
SHA-256 checksum
How to use checksums
55ebea8481ef6c1c0d77e34f76f2833d598e9dbf0185f9ea47c2593cd2a89e40
BLAKE2b-256 checksum
How to use checksums
7cdc5342e73ac4465e52848fa61cde311946fe7e405e3d1e08c91f2eb79d9ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.1.2 This release

1 release file

1.1.1

2 release files

1.1.0

2 release files

1.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page