Python Scripting for Linux Administrators

Preference Dates Timing Location
Evening Course 22, 23, 24, 25 November 2020 7:00PM - 9:30PM Dubai Knowledge Park

Course Description

In this course, you will learn how to write powerful Python scripts to automate critical Linux System Administration tasks.  The first part of this course focuses on core language features such as data structures, loops, flow control, file input/output, functions, and error handling.   Subsequently, you will learn how to use Python libraries such as os, glob, and regex to build sophisticated command-line tools, which can take on most of the Linux System Administrator’s grunt work.

Unit 1 – Environment Setup

  • Setting up a Cloud Server Development Environment
  • Installing Python 3 on CentOS 7
  • Installing Python 3 on Debian/Ubuntu

Unit 2 – Introducing Python

  • History and Benefits of Python
  • Key Features of Python 3

Unit 3 – Running Python

  • Running Python
  • Introducing the REPL for Rapid Experimentation
  • Creating and Running Python Scripts
  • Using Comments

Unit 4 – Python Data Types

  • Strings
  • Numbers (int and float)
  • Boolean and None
  • Working with Variables
  • Lists
  • Tuples
  • Dictionaries

Unit 5 – Control Flow

  • Conditionals and Comparisons
  • The ‘while’ Loop
  • The ‘for’ Loop
  • Logical Operators

Unit 6 – Basic Scripting

  • Reading User Input
  • Function Basics
  • Using Functions in Scripts
  • Using Standard Library Packages
  • Working with Environment Variables
  • Interacting with Files

Unit 7 – Intermediate Scripting

  • Parsing Command Line Parameters
  • Robust CLIs with ‘argparse’
  • Error Handling with try/except/else/finally
  • Exit Statuses
  • Execute Shell Commands from Python
  • Advanced Iteration with List Comprehensions

Unit 8 – Useful Standard Libraries

  • random and json
  • shutil and glob
  • re and math

Unit 9 – Using Pip and Virtualenv

  • Installing Third-Party Packages Using ‘pip’
  • Setting up Virtualenv
  • Using Third-Party Packages in Your Scripts

Unit 10 – Planning Your Project Structure

  • Examining the Problem
  • Planing You r Project.
  • Initial Project Layout

Unit 11 – Implementing Code Features with Test Driven Development

  • Introduction to TDD and First Tests
  • Creating CLI interfaces
  • Introduction to Mocking in Tests
  • Interacting with PostgreSQL
  • Implementing Local File Storage
  • Interacting with AWS

Unit 12 – Integrating Features and Distributing Your Project

  • Integrating all the modules
  • Building and Sharing a Wheel Distribution
  • Linux System Administrators

Knowledge of Linux System Administration

The participants who have successfully completed this course are encouraged to take Python for Data Science and Machine Learning.

Testimonials