Python 101 – Basics

Python is an interpreted, object-oriented, high-level language that empowers you to automate your work so it can be completed predictably and accurately. This freely available language is installed on all major platforms without a charge. Given Python’s vast libraries, you’ll have a head start programming most tasks.

Days : 5
Price :

CAD$3,160.00

Effacer

Description

Python is an interpreted, object-oriented, high-level language that empowers you to automate your work so it can be completed predictably and accurately. This freely available language is installed on all major platforms without a charge. Given Python’s vast libraries, you’ll have a head start programming most tasks.

Be it system admins, network, cloud, or storage engineers, all lessons in our courseware are highly relevant for scripting within the workplace, including; data retrieval and storage from the local system, working with RESTful APIs, and decoding JSON.

Class is a combination of live instructor demo and hands-on labs.

Who should attend

  • This course is an appropriate introduction to students of any background looking to get started with Python
  • System Administrators
  • Network Administrators and Engineers
  • DevOps Engineers
  • Management, Directors, VPs

Prerequisites

Keyboard proficiency.

Course Objectives

  • Current Python3 Standard Library
  • Popular 3rd party libraries
  • Version control with git
  • Git integration with popular SCM (GitHub)
  • Parsing and building files
  • Pull JSON from API queries
  • Manipulate Excel and other popular formats with pandas dataframes
  • Building feature rich charts and graphs
  • Searching with Regular Expressions (regex)
  • Best practice techniques

Follow On Courses

APIs and API Design with Python (AADP)
Jenkins Automation Server Essentials (JASE)
Python for Network Automation (PNA)

Outline: Python Basics (PBS)

Introduction to Python

  • Installing Python 3.x
  • Preparing to write Python
  • Preparing to write a Python file (*.py) – Text Editors
  • Executing a Python file
  • Python Enhancement Proposals (PEPs)
  • Python Statements and Control Flow
  • Python Interpreter
  • Overview of the Standard Library

Version Controlling Code with Git

  • Overview of Git
  • Git commands
  • Set up a GitHub account
  • GitHub essentials
  • README course requirements
  • How to Set up a repo
  • Issue a Pull request
  • How to use “Issues” for peer review

Basics of Programming

  • Functions and purpose of main()
  • Objects
  • Methods
  • Built in Functions
  • Arguments
  • Controlling standard out
  • White spacing basic rules
  • String Literal Escape Sequences
  • Python Variables
  • Naming Conventions & Rules
  • Types as Objects
  • Sequence Types
  • List Iteration
  • List Enumeration
  • Sequence Assignments
  • Mutable vs Immutable Objects
  • Assignment Shorthand

Python Basic Variables and Data Types

  • Numeric Types
  • Operators and Precedence / Arithmetic Expressions
  • Integers
  • Floating points

String Types

  • Generating Strings in Python
  • Common String Methods
  • Formatting String Output
  • Booleans
  • Printing and formatting strings
  • Scripting with input()
  • About raw_input()

Lists & Dictionaries & Tuples

  • Lists
  • Mixed Lists
  • Common List Methods
  • Other List Operations
  • An overview on and construction of dictionaries
  • Keys and Values
  • Dictionary Methods
  • Tuples
  • Python Time Tuples
  • Dictionaries vs Lists vs Tuples
  • Translating JSON to Pythonic data

If, elif, else

  • Relational Operators
  • Logical operators
  • Comparison Operations
  • “simple” if Statement
  • If else statements
  • If elif
  • Nested if statement

Looping with “while”

  • While usage
  • Count controlled loop
  • Event controlled loop
  • Continue
  • Break

Looping with “for”

  • The for Loop
  • For iteration examples
  • Looping across data sets
  • Looping across lists of lists
  • Looping across lists of dictionaries

Understanding Iterators

  • The range() Function
  • Taking the range() of len()
  • Iterable Objects
  • The iter() Function
  • Looping with dictionaries
  • Looping with lists

Getting Data In and Out of Python

  • Opening Files
  • Working with Files
  • Read data from files
  • Controlling Output Location
  • Intro to working with APIs
  • What is a “REST”ful API?
  • APIs and JSON

Creating Python Functions

  • Function Basics
  • Defining Functions
  • Function Polymorphism
  • Argument Defaults
  • Lambdas
  • What is if name == “main”
  • Local Variables
  • Variable Masking
  • Preventing Variable Modifications
  • Argument Matching Methods
  • Basic List Comprehensions

Modules & Packages

  • Pip and pip3
  • Module Basics
  • Packages
  • Virtual environments
  • Defined modules
  • Import modules
  • From import statements
  • Some useful modules to know
  • RESTful APIs and requests
  • Dataframes with pandas
  • Graphing with matplotlib

Python Scope

  • Naming conventions
  • Local scope
  • Global scope
  • Nested scope

Object Oriented Python

  • About OOP
  • The Class Statements
  • Defining a class
  • Class Inheritance
  • Classes as Objects
  • Using Dictionaries
  • Understanding self
  • Class fields and constructors
  • Data structures
  • Subclasses (Inheritance)
  • Multiple Inheritance
  • Static methods

(Optional) Regular Expression

  • import re library
  • Writing regular expression
  • Searching for data in files
  • Using Regular Expression to search data sets
  • Searching for data in Wireshark Traces (Python and *.pcaps)