Welcome to the Python for DevOps repository! This project is a collection of Python scripts and tools that focus on various DevOps-related tasks. The primary purpose of this repository is for personal learning, covering topics such as file handling, encryption, AWS automation, regular expressions, and more. This repository aims to enhance Python skills and explore its applications in DevOps scenarios.
- Introduction
- Table of Contents
- Folder Structure
- Scripts Overview
- Installation Instructions
- Usage Guide
- Contributing
- License
Here's an overview of the folder structure in this repository:
.
├── argparse/ # Command-line argument parsing scripts
├── aws_boto_library/ # AWS automation scripts using Boto3
├── data_structures/ # Examples of Python data structures
├── disk_utils/ # Disk utility scripts (e.g., fdisk, blkid, lsblk)
├── encryption/ # Encryption and hashing scripts
├── file_handling/ # File operations and handling scripts
├── regex_library/ # Regular expression examples and tasks
└── utils/ # Various utility scripts
Here’s a summary of some of the key scripts and their functionalities:
argparse/Command_line_tool_using_argparse.py
: Demonstrates how to useargparse
to create command-line tools in Python.argparse/Using_Click.py
: Uses theClick
library to create a more user-friendly command-line interface.
aws_boto_library/Python_Task-1_Creating_S3_Bucket_using_Boto3.py
: Automates the creation of an S3 bucket using theboto3
library.aws_boto_library/Python_Task-3_Creating_EC2_Instance_Using_Boto3.py
: Automates the creation of an EC2 instance usingboto3
.
data_structures/Data_Structure_Binary_Tree.py
: Implements a binary tree.data_structures/Data_Structure_Graph.py
: Implements a graph and its traversal methods.
file_handling/File_Task_1_Reverse_the_content_of_a_file.py
: Reverses the content of a file.file_handling/File_Task_2_Print_specific_line.py
: Prints specific lines from a log file based on a pattern.
encryption/Encrypting_Text_Hashing_&_Hashlib.py
: Demonstrates text hashing and encryption using Python'shashlib
.encryption/Encryption_With_Cryptography.py
: Uses thecryptography
library for encryption tasks.
regex_library/Regex_Task_3_Extract_All_the_IP_Addresses.py
: Extracts all IP addresses from a log file using regular expressions.regex_library/Regex_Task_4_Extract_dates_in_the_format_of_yyyy-mm-dd.py
: Extracts dates inyyyy-mm-dd
format from a log file using regular expressions.
To get started, clone the repository to your local machine:
git clone https://github.com/GMATHUR90/rhcsa-prep.git
cd rhcsa-prep
Make sure you have Python 3.x installed. You can check your Python version with:
python3 --version
pip install -r requirements.txt
If there is no requirements.txt file, refer to the individual scripts to see which libraries need to be installed (e.g., boto3, cryptography, Click).
This repository is for personal learning purposes only. Contributions, issues, or pull requests from others are not being accepted at this time.
This repository is licensed under the MIT License. See the LICENSE file for more details.