Cademy logoCademy Marketplace

Course Images

Complete Python Scripting for Automation

Complete Python Scripting for Automation

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 24 hours 39 minutes

  • All levels

Description

Get up to speed with automating repetitive tasks with Python

Over the last few years, Python has gained immense popularity. The demand for the programming language in the job market has particularly increased and being well-versed with it can help you enter some of the most exciting industries, including data science, artificial intelligence (AI), web applications, server-side automation, and home automation. This course will make it easy for you to learn Python, with an emphasis on server-side automation. You will not only get to grips with core Python but also focus on advanced Python. Gradually, the course will take you through writing a Python script to print the OS name. You'll also learn how to pass elements into a program using *args. To build on your knowledge further, you'll understand the technique of transferring a file from a local server to a remote server and vice versa using paramiko. By the end of this course, you will have learned how to automate a wide variety of tasks with the help of Python scripting. All codes and supporting files are available at- https://github.com/PacktPublishing/Complete-Python-Scripting-for-Automation

What You Will Learn

Understand how to use Python scripting for automation
Get hands-on with core Python and advanced Python
Delve into the OS module and its various functions such as os.name and os.error

Audience

This course is for anyone who is just getting started with programming and is looking to learn Python from scratch.

Approach

This course is structured to make programming easy for beginners. It features detailed explanations with step-by-step instructions to help you learn effectively.

Key Features

Understand how to use Atom Editor to run a Python script * Get to grips with arithmetic and assignment operators

Github Repo

https://github.com/packtpublishing/complete-python-scripting-for-automation

About the Author

VR Technologies

VRTechnologies is a seasoned DevOps automation consultant with a specialization in cloud and DevOps. With a wealth of experience, they have successfully trained over 400 students through comprehensive automation courses covering Shell, Python, and Ansible. With six years of training expertise, VRTechnologies' commitment to staying at the forefront of technology trends is unmatched, ensuring that students receive the most up-to-date knowledge. Their passion for learning and teaching drives them to meticulously research and prepare each course, offering hands-on demonstrations from the basics to advanced concepts. Join VRTechnologies on a transformative learning journey and unlock the power of automation in your career.

Course Outline

1. Introduction

1. Introduction to the Python

Introduction: Introduction to the Python

2. Python setup on Windows

Introduction: Python setup on Windows

3. Python setup on Linux (Installing required python on Linux)

Introduction: Python setup on Linux (Installing required python on Linux)

4. Editors for Python code

Introduction: Editors for Python code

5. How to use Atom Editor to run python script

Introduction: How to use Atom Editor to run python script


2. Basics of print, indentation, comments and special characters

1. simple hello world script

Basics of print, indentation, comments and special characters: simple hello world script

2. Python Indentation

Basics of print, indentation, comments and special characters: Python Indentation

3. Python Comments

Basics of print, indentation, comments and special characters: Python Comments

4. Usage of special characters with print statement

Basics of print, indentation, comments and special characters: Usage of special characters with print statement

5. Running Python script on Windows and Linux

Basics of print, indentation, comments and special characters: Running Python script on Windows and Linux


3. Basics of variables and Data Types

1. Introduction to variables and print with variables

Basics of variables and Data Types: Introduction to variables and print with variables

2. Data Types

Basics of variables and Data Types: Data Types

3. working with multiple variable and strings in print

Basics of variables and Data Types: working with multiple variable and strings in print

4. Input and Output Syntax

Basics of variables and Data Types: Input and Output Syntax


4. Complete String Operations

1. Basic operations on strings

Complete String Operations: Basic operations on strings

2. case (Lower, Upper etc...) conversion operations

Complete String Operations: case (Lower, Upper etc...) conversion operations

3. Boolean result operations

Complete String Operations: Boolean result operations

4. join, center and zfill (zero fill)

Complete String Operations: join, center and zfill (zero fill)

5. strip, split operations

Complete String Operations: strip, split operations

6. count, index and find operations on strings

Complete String Operations: count, index and find operations on strings

7. Practice: Display given string at left/right/center of a line in title format

Complete String Operations: Practice: Display given string at left/right/center of a line in title format


5. Data Structures of Python

1. Introduction to Data Structures and Types of Data Structures

Data Structures of Python: Introduction to Data Structures and Types of Data Structures

2. Lists

Data Structures of Python: Lists

3. Tuples

Data Structures of Python: Tuples

4. Dictionaries

Data Structures of Python: Dictionaries

5. Sets

Data Structures of Python: Sets


6. Operators of Python

1. Introduction to Operators of Python

Operators of Python: Introduction to Operators of Python

2. Arithmetic and Assignment Operators

Operators of Python: Arithmetic and Assignment Operators

3. Comparison Operators

Operators of Python: Comparison Operators

4. Identity and Membership operators

Operators of Python: Identity and Membership operators

5. Logical Operators

Operators of Python: Logical Operators


7. Conditional statements

1. Introduction to conditional statements; simple if condition

Conditional statements: Introduction to conditional statements; simple if condition

2. if ... else and if ... elif ... elif ... else condition

Conditional statements: if ... else and if ... elif ... elif ... else condition

3. Practice with conditional statements

Conditional statements: Practice with conditional statements


8. Working with Python Modules

1. Introduction to Python Modules

Working with Python Modules: Introduction to Python Modules

2. platform module

Working with Python Modules: platform module

3. getpass module

Working with Python Modules: getpass module


9. sys module

1. Introduction to sys module

sys module: Introduction to sys module

2. sys.argv | working with command line arguments with an example

sys module: sys.argv | working with command line arguments with an example


10. OS Module

1. Introduction to OS Module and Basic operation

OS Module: Introduction to OS Module and Basic operation

2. os.path module

OS Module: os.path module

3. os.system() function from os module

OS Module: os.system() function from os module

4. Practice script on platform and os module

OS Module: Practice script on platform and os module

5. os.walk(path)

OS Module: os.walk(path)

6. Best Practice with os.walk for real-time

OS Module: Best Practice with os.walk for real-time


11. Loops - for and while loops with break, continue and pass

1. Practice: Read a path and check if given path is a file or a directory

Loops - for and while loops with break, continue and pass: Practice: Read a path and check if given path is a file or a directory

2. Introduction to loops with an example

Loops - for and while loops with break, continue and pass: Introduction to loops with an example

3. Loops | Working with for loop

Loops - for and while loops with break, continue and pass: Loops | Working with for loop

4. Simple practice with for loop

Loops - for and while loops with break, continue and pass: Simple practice with for loop

5. Find all files in a directory with required extension.py/.sh/.log/.txt etc...

Loops - for and while loops with break, continue and pass: Find all files in a directory with required extension.py/.sh/.log/.txt etc...

6. Complete range() function

Loops - for and while loops with break, continue and pass: Complete range() function

7. for loop to work with strings, list, tuple and dictionaries

Loops - for and while loops with break, continue and pass: for loop to work with strings, list, tuple and dictionaries

8. Introduction to while loop

Loops - for and while loops with break, continue and pass: Introduction to while loop

9. Loop Control statements: break, continue and pass

Loops - for and while loops with break, continue and pass: Loop Control statements: break, continue and pass


12. datetime module to work with dates and times

1. Introduction to datetime module

datetime module to work with dates and times: Introduction to datetime module

2. Practice: Find the files which are older than x days from a given path

datetime module to work with dates and times: Practice: Find the files which are older than x days from a given path


13. subprocess Module: To execute any Operating System Commands with python

1. Introduction to subprocess module

subprocess Module: To execute any Operating System Commands with python: Introduction to subprocess module

2. Practice-1 with subprocess module

subprocess Module: To execute any Operating System Commands with python: Practice-1 with subprocess module

3. Practice-2: Platform independent script to find the java version

subprocess Module: To execute any Operating System Commands with python: Practice-2: Platform independent script to find the java version


14. Working with text files

1. Working with text files: Reading and writing to text files

Working with text files: Working with text files: Reading and writing to text files

2. Copy the content of a source file into a destination file

Working with text files: Copy the content of a source file into a destination file


15. Working with csv

1. Introduction to csv files and How to read a csv files using python?

Working with csv: Introduction to csv files and How to read a csv files using python?

2. Read only header of a csv file and Finding the no of rows in a csv file

Working with csv: Read only header of a csv file and Finding the no of rows in a csv file

3. Creating csv file

Working with csv: Creating csv file


16. Working with files like json

1. Working with json files

Working with files like json: Working with json files


17. Exception Handling

1. Introduction to Exception Handling

Exception Handling: Introduction to Exception Handling

2. Exception Handling for known Exceptions

Exception Handling: Exception Handling for known Exceptions

3. try except else and finally usage

Exception Handling: try except else and finally usage

4. Raise user Defined Exceptions

Exception Handling: Raise user Defined Exceptions


18. Functions

1. Introduction to Functions

Functions: Introduction to Functions

2. How to define a Function and How to use defined Function, Types of Functions

Functions: How to define a Function and How to use defined Function, Types of Functions

3. Converting simple code into Functions

Functions: Converting simple code into Functions

4. Calling a function from another function and Scope of the variables

Functions: Calling a function from another function and Scope of the variables

5. Simple Functions with arguments

Functions: Simple Functions with arguments

6. Functions with arguments and return value

Functions: Functions with arguments and return value

7. Functions with default arguments

Functions: Functions with default arguments

8. Functions with keyword-based arguments

Functions: Functions with keyword-based arguments

9. Functions with Variable length arguments

Functions: Functions with Variable length arguments

10. Functions with variable keyword arguments

Functions: Functions with variable keyword arguments

11. How to use Functions of one script into another script, what is __name__ ?

Functions: How to use Functions of one script into another script, what is __name__ ?

12. Simple exception handling to changing current working directory

Functions: Simple exception handling to changing current working directory


19. Regular expression with re module

1. Introduction to regular expressions

Regular expression with re module: Introduction to regular expressions

2. Basic rules to create a pattern for regex

Regular expression with re module: Basic rules to create a pattern for regex

3. Rules to create a pattern Part-2

Regular expression with re module: Rules to create a pattern Part-2

4. Rules to create a pattern Part-2

Regular expression with re module: Rules to create a pattern Part-2

5. Regex with Flags

Regular expression with re module: Regex with Flags

6. working with search and match operations from re module

Regular expression with re module: working with search and match operations from re module

7. working with findall and finditer operations

Regular expression with re module: working with findall and finditer operations

8. working with split, sub and subn operations of re module

Regular expression with re module: working with split, sub and subn operations of re module

9. compile operation (Execute all re operations on compile object)

Regular expression with re module: compile operation (Execute all re operations on compile object)


20. Paramiko module to work with remote servers using python

1. Introduction to paramiko

Paramiko module to work with remote servers using python: Introduction to paramiko

2. Transfer file from local server to remote server and vice versa using paramiko

Paramiko module to work with remote servers using python: Transfer file from local server to remote server and vice versa using paramiko


21. Shutil module

1. Part-1: copy file(s) with shutil module

Shutil module: Part-1: copy file(s) with shutil module


22. OOPS for Real Time

1. Introduction to oops

OOPS for Real Time: Introduction to oops

2. Class and object attributes

OOPS for Real Time: Class and object attributes

3. Constructor of a class

OOPS for Real Time: Constructor of a class

4. Simple Python Script without and with oops concepts

OOPS for Real Time: Simple Python Script without and with oops concepts

5. destructor of a class

OOPS for Real Time: destructor of a class

6. Polymorphism and inheritance of python oops

OOPS for Real Time: Polymorphism and inheritance of python oops

7. Encapsulation

OOPS for Real Time: Encapsulation


23. Windows Subsystem for Linux

1. Linux for Developers on Windows

Windows Subsystem for Linux: Linux for Developers on Windows

Course Content

  1. Complete Python Scripting for Automation

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews