{"id":17586838,"url":"https://github.com/rahulguptagzb09/automation-libs-using-python","last_synced_at":"2026-04-06T02:34:28.532Z","repository":{"id":258391303,"uuid":"871056812","full_name":"rahulguptagzb09/Automation-Libs-Using-Python","owner":"rahulguptagzb09","description":"These libraries/functions are related to dictionaries (HashMaps), YAMLs, Files, Git, Linux Ubuntu, Docker, Kubernetes, Pcap Wireshark","archived":false,"fork":false,"pushed_at":"2024-10-13T06:41:03.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:43:22.190Z","etag":null,"topics":["automation","dictionary","docker","file","git","json","kubernetes","linux","pcap","python","schema","test-automation","ubuntu","wireshark","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahulguptagzb09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T07:25:30.000Z","updated_at":"2024-10-13T06:41:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e13e352-d5ce-4119-94c9-d918d6e4ad48","html_url":"https://github.com/rahulguptagzb09/Automation-Libs-Using-Python","commit_stats":null,"previous_names":["rahulguptagzb09/automation-libs-using-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulguptagzb09%2FAutomation-Libs-Using-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulguptagzb09%2FAutomation-Libs-Using-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulguptagzb09%2FAutomation-Libs-Using-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulguptagzb09%2FAutomation-Libs-Using-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahulguptagzb09","download_url":"https://codeload.github.com/rahulguptagzb09/Automation-Libs-Using-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223268,"owners_count":20743158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","dictionary","docker","file","git","json","kubernetes","linux","pcap","python","schema","test-automation","ubuntu","wireshark","yaml"],"created_at":"2024-10-22T03:06:30.823Z","updated_at":"2025-12-30T20:29:45.627Z","avatar_url":"https://github.com/rahulguptagzb09.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Functions/Libraries for Automation\r\n\r\nThese libraries/functions are related to dictionaries (HashMaps), YAMLs, Files, Git, Linux Ubuntu, Docker, Kubernetes, Pcap Wireshark\r\n\r\nPYTHON 3.10 INSTALLATION\r\n\r\nTo download python software from the below link and follow the standard application installation procedure.\r\n\r\n    https://www.python.org/downloads/release/python-3103/\r\n\r\nEnvironment variables to be configured for python.\r\n    \r\n    Open Start -\u003e Settings -\u003e Control Panel -\u003e System -\u003e Advanced -\u003e Environment Variables\r\n        C:\\Python_3.10.3\\\r\n        C:\\Python_3.10.3\\Scripts\\\r\n\r\nTo validate python is installed using below commands\r\n\r\n    python --version\r\n\r\nPackage names and version are available in requirements.txt file.\r\n\r\n    pip install -r requirements.txt\r\n\r\nWIRESHARK 3.6.14 Windows INSTALLATION\r\n\r\nDownload “wireshark”  from below link and follow the standard application installation procedure.\r\n\r\n\thttps://www.wireshark.org/download.html\r\n\r\nWIRESHARK 3.6.14 Linux INSTALLATION - \r\n\r\n    wget https://1.eu.dl.wireshark.org/src/wireshark-3.6.14.tar.xz\r\n    \r\n    tar -xf wireshark-3.6.14.tar.xz\r\n    \r\n    sudo apt-get install cmake -y\r\n    \r\n    sudo apt-get install -y libglib2.0-dev libglib2.0-dev libc-ares-dev libgcrypt20-dev\r\n    \r\n    sudo apt-get install -y libglib2.0-dev flex bison libpcre2-dev libpcap-dev libnghttp2-dev\r\n    \r\n    sudo apt-get install -y qttools5-dev qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev\r\n    \r\n    sudo apt-get install -y build-essential\r\n    \r\n    cd wireshark-3.6.14/cmake\r\n    \r\n    sudo cmake ..\r\n    \r\n    sudo make\r\n    \r\n    sudo make install\r\n    \r\n    sudo ldconfig\r\n    \r\n    wireshark --version\r\n\t\r\nWIRESHARK 3.6.14 Linux UNINSTALLATION - \r\n\r\n\tThe method is shown here: https://www.youtube.com/watch?v=WOJWbAyjflk\r\n\r\n\tsudo apt-get remove --autoremove wireshark wireshark-*\r\n\r\n\tsudo rm -rf /etc/wireshark\r\n\r\n\tcheck if everything is removed with whereis wireshark\r\n\r\n# Documentation - \r\n\r\nDictionary Utils - \r\n    \r\n    def validate_dict_schema(input_dict: dict, schema_dict: dict = None, schema_json: str = None) -\u003e dict:\r\n    def lowercase_keys_dict(data: dict, ignore_keys: tuple = ()) -\u003e dict:\r\n    def uppercase_keys_dict(data: dict, ignore_keys: tuple = ()) -\u003e dict:\r\n    def get_keys_list_from_dict(data: dict, key_path_list: list) -\u003e list:\r\n    def get_value_from_key_path_dict(data: dict, key_path_list: list):\r\n    def load_json(json_file: str) -\u003e dict:\r\n    def validate_data(data: dict, schema: dict = None) -\u003e dict:\r\n\r\nYAML Utils - \r\n    \r\n    def validate_yaml_schema(yaml_file: str, schema_dict: dict = None, schema_json: str = None) -\u003e dict:\r\n    def lowercase_keys_yaml(input_file: str, output_file: str, ignore_keys: tuple = (), mapping: int = 2, sequence: int = 4, offset: int = 2) -\u003e None:\r\n    def uppercase_keys_yaml(input_file: str, output_file: str, ignore_keys: tuple = (), mapping: int = 2, sequence: int = 4, offset: int = 2) -\u003e None:\r\n    def get_keys_list_from_yaml(input_file: str, key_path_list: list) -\u003e list:\r\n    def load_yaml(yaml_file: str) -\u003e dict:\r\n\r\nFile Utils - \r\n    \r\n    def delete_files(path: str, days: int = 1, file_extension: str = \"\", file_name_starting: str = \"\") -\u003e list:\r\n    def split_file_by_lines(input_dir: str, output_dir: str, number_of_lines: int = 1) -\u003e None:\r\n    def find_lines_in_file_without_words(file_name: str, words: list) -\u003e list:\r\n    def create_html(path: str, fields: list, data: dict) -\u003e None:\r\n    def unzip_file(directory: str, zip_file_name: str) -\u003e None:\r\n    def get_latest_file(find_file_str: str, directory: str) -\u003e str:\r\n    def get_tag_value_from_xml_file(xml_file: str, tag_name: str) -\u003e str:\r\n    def delete_directory(folder_path: str) -\u003e None:\r\n    def get_files_differences(file1_path: str, file2_path: str) -\u003e dict:\r\n\r\nGit Utils -\r\n    \r\n    def clone_git_repo(repo_url: str, repo_dir: str, repo_branch: str) -\u003e None:\r\n    def get_branch_list(repo_url: str, repo_dir: str) -\u003e list:\r\n\r\nPcap Analyzer Wireshark Utils - \r\n    \r\n    def pcap_to_csv(pcap_file: str, csv_file: str, wireshark_path: str = None, csv_file_preferences: str = None, columns=None, display_filter: str = None, all_protocol: bool = True, tshark_cmd: str = None) -\u003e str:\r\n    def pcap_to_txt(pcap_file: str, txt_file: str, display_filter: str = None, decode_pref: dict = None, custom_pref: dict = None) -\u003e str:\r\n    def get_pcap_data(pcap_file: str, display_filter: str = None, decode_pref: dict = None, custom_pref: dict = None) -\u003e str:\r\n    def get_packet_header_count(pcap_csv_file: str, packet_header: str) -\u003e int:\r\n\r\nLinux Docker CLI - \r\n\r\n    def check_docker_service(ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e bool:\r\n    def build_docker_image(image_name: str, dockerfile_path: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def stop_docker_container(container_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def delete_docker_container(container_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def delete_docker_image(image_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def push_docker_image(image_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n\r\nLinux Kubernetes CLI - \r\n\r\n    def run_command_within_pod(kube_config: str, command: str, pod_name: str, container_name: str = None, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def copy_file_from_pod(kube_config: str, pod_name: str, container_name: str, src_path: str, dst_path: str, file_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def scale_pod(kube_config: str, deployment_name: str, pod_count: int, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def get_pod_logs(kube_config: str, pod_name: str, tail: int = None, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def create_resource(kube_config: str, file: str, namespace: str = \"default\", ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def apply_resource(kube_config: str, file: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def delete_resource(kube_config: str, resource_type: str, name: str, namespace: str = \"default\", force: bool = False, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def get_resource_details_yaml(kube_config: str, resource_type: str, resource_name: str = \"\", namespace: str = \"default\", ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e dict:\r\n\r\nLinux Ubuntu CLI - \r\n\r\n    def create_ssh_conn(username: str, password: str, hostname: str = None, ip_address: str = None, pki: str = None, port: int = 22, sock: object = None) -\u003e SSHClient:\r\n    def close_ssh_conn(ssh_conn: SSHClient) -\u003e None:\r\n    def check_connection_status(ssh_conn: SSHClient) -\u003e bool:\r\n    def create_sftp_conn(ssh_conn: SSHClient) -\u003e SFTPClient:\r\n    def close_sftp_conn(sftp_conn: SFTPClient) -\u003e None:\r\n    def create_jumphost_conn(jumphost_public_ip: str, jumphost_private_ip: str, jumphost_username: str, jumphost_password: str, username: str, password: str, hostname: str = None, ip_address: str = None, jumphost_port: int = 22, port: int = 22) -\u003e SSHClient:\r\n    def start_tcpdump(pcap_file_path: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def get_process_id_list(process_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e list:\r\n    def soft_kill_process(process_id: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def hard_kill_process(process_id: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e Non\r\n    def copy_file_from_remote_to_local(remote_file_path: str, local_dir_path: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def create_file(file_name: str, file_data: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def get_file_content(file_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def truncate_file(file: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def find_file(dir_path: str, file_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def change_file_mode(file_mode: str, file_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def delete_file(file_path: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def create_directory(dir_path: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def compress_directory(folder_path: str, folder_name: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def delete_directory(directory: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def get_active_service_list(service_type: str, send_sudo: bool = False, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e list:\r\n    def run_systemctl_command(option: str, unit: str, send_sudo: bool = False, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n    def get_hostname(ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def set_hostname(hostname: str, ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e str:\r\n    def reboot_system(ssh_conn: SSHClient = None, ip_address: str = None, username: str = None, password: str = None) -\u003e None:\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulguptagzb09%2Fautomation-libs-using-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulguptagzb09%2Fautomation-libs-using-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulguptagzb09%2Fautomation-libs-using-python/lists"}