3-Week Python Essentials

Course Overview

This class is a study of the Python programming language. Students will learn to build their own environments in which to program, and begin writing their own code. By the end of the first day, you should feel comfortable writing code on your own machine. By the conclusion of the course, students will understand the basics of object-oriented programming, how to use Python to interact with data sets (such as XML and JSON), interact with APIs, track down code snippets and programs on places like GitHub, as well as debug broken code. This course is 50% lecture and 50% hands-on labs. Students need no prior programming experience.

python course cover image

Course Outline: Python Essentials 1-3

3-Week with Hands-on Labs


Week 1: Python Basics

  1. Introduction to Python
    • Installing Python 2.x
    • Installing Python 3.x
    • Preparing to write Python
    • Preparing to write a Python file (*.py) - Text Editors
    • Executing a Python file
    • Python Enhancement Proposals
    • Python Statements and Control Flow
  2. Version Controlling Code
    • 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
  3. Submitting your work in Docker
    • Using Docker files
    • Docker build
    • Docker run
    • Formatting the output of your solutions
    • How your work will be graded.
  4. Basics of Programming
    • Python Variables
    • Naming Conventions & Rules
    • Types as Objects
    • Variable References & Garbage Collection
    • Sequence Types
      • Membership Statements
      • List Iteration
      • List Enumeration
    • Sequence Assignments
    • Mutable vs Immutable Objects
    • Multi Target Assignments
    • Assignment Shorthand
  5. Numeric Operations in Python
    • More About Python's Numeric Types
    • Numeric Tools
    • The Decimal Module
    • Operator Precedence
  6. Python String Types
    • Generating Strings in Python
    • Common String Methods
    • Type Conversion in Python
    • Formatting String Output
    • Variable Substitution
    • String Slicing
  7. Python Lists & Tuples
    • Python Lists
    • Common List Methods
    • Other List Operations
    • Tuples
  8. Python Dictionaries
    • Python Dictionaries
    • Assigning Values to Dictionaries
    • Dictionary Methods
    • Dictionaries vs Lists & Tuples
  9. Looping with “if”
    • Python Nesting Recap
    • Comparison Operations
    • The if Statement
    • The if Ternary Expression
  10. Looping with “while”
    • The while loop
    • Continue
    • Break
  11. Looping with “for”
    • The for Loop
  12. Understanding Iterators
    • The range() Function
    • Iterable Objects
    • The iter() Function
    • Using map With Iterators
  13. Basic Input/Output with Files
    • Opening Files
    • Working with Files
    • Controlling Output Location
  14. Python List Comprehension
    • Basic List Comprehensions
    • Compound List Comprehensions
  15. Creating Python Functions
    • Function Basics
    • Defining Functions
    • Function Polymorphism
    • Argument Defaults
    • Lambdas
    • Local Variables
    • Variable Masking
    • Understanding __builtin__
    • Preventing Variable Modifications
    • Argument Matching Methods
  16. Modules & Packages
    • Module Basics
    • Packages
    • Using __all__ and _ Variables
    • Using __name__
  17. Object Oriented Python
    • About OOP
    • The Class Statements
    • Class Inheritance
    • Classes as Objects
    • Using Dictionaries
    • Understanding self
    • Overriding Inherited Methods
    • More Inheritance
    • Operator Overloading
      • The __iter__ Method
      • The __getitem__ Method
    • Empty Classes For Storage
    • Pickling & Shelving Objects
    • Multiple Inheritance

(Week 1 ends)

Week 2: Advanced Python

  1. Exceptions
    • About Exceptions
    • Python's Default Exception Handler
    • Using Try/Except/Finally Exceptions
    • Generating User Defined Exceptions
    • More on Exceptions
    • Exception Examples
    • Using Asserts
    • Exception Classes
  2. Python Generators
    • About Generators
    • Generator Syntax
    • Communicating with Generators with send()
  3. OS Interfacing
    • About the sys & os Modules
    • Gleaning More Using __doc__ & help()
    • Common sys Module Attributes & Methods
    • Working With the os Module & Files/Directories
    • File & Path Examples
    • Working with os.path
    • os & os.path Module Examples
    • Running Shell Commands
  4. Accessing Databases with Python
    • About Database Access
    • About psycopg2
    • PostgreSQL Connect Strings
    • Cursor Objects
    • PsychoPG2 Examples
  5. Python & the Web
    • About the Web
    • Understanding HTTP
    • Using the CGI Module
  6. Python Decorators
    • About Decorators
    • Simple Function Decorators
    • Classes as Decorators
    • Chained Decorators
    • Decorator Arguments
    • Exercises
  • Python Regular Expressions
    • About Regular Expressions
    • re Basics
    • Expression Basics
    • Using match() and search()
    • Working with Match Objects
    • Other re Module Functions
    • Passing in Modifier Flags
    • Exercises
  • Sockets & Networking
    • Socket Basics
    • The Socket Module
      • Network Clients
    • Creating Network Servers
      • Example Server
    • Exercises
  • Python Protocol Clients
    • Protocol Support
    • Exercises
  • Generating & Sending Email
    • The email Module
    • Creating Simple Emails
    • Creating a Message
    • Creating SMTP Connections
    • SMTP Methods
    • Exercises
  • Processes and Threads
    • Running Shell Commands
    • Popen Objects
    • Using Parallel Processing
    • Using Python's os.fork() Function
    • Using os.exec*() Variants
    • Exercises
    • Python Threads
    • The threading Module
    • Thread Objects
    • Custom Thread Objects
    • Working with Locks
    • Using Reentrant Locks
    • Condition Objects
    • Exercises
    • Using the Queue Object
    • Using Semaphores
    • Using with for Locks, RLocks, Condition & Sempahores
    • Event Objects
    • Timer Objects
    • Processing Exit Codes
    • Exercises
    • The multiprocessing Module
    • Using multiprocessing
    • Exchanging Objects
    • Using Pipes
    • Synchronization
    • Using multiprocess Managers
  • Signal Handling
    • The Signal Module
    • Defining Signal Handlers
    • Signal Numbers
    • Common Signal Module Functions
    • Using set_wakeup_fd()
    • Using Timers
    • Other Signal Notes
    • Exercises
  • Introduction to Twisted
    • About Twisted
    • Installing Twisted
    • Twisted Basics
    • The Twisted Reactor
      • Using CallLater
    • Understanding Deferred Objects
    • Creating Deferred Objects
    • Stacking Callbacks
    • Stacking Deferred
    • What about concurrency?
      • Exercises
  • Networking with Twisted
    • Networking Basics
    • Creating a ClientFactory
    • Twisted Failures
    • Protocol Objects
    • Creating Network Clients
    • Creating SSL Clients
    • SSL Context
    • Twisted Helpers
    • Twisted Protocol Support
    • Using Twisted SMTP Protocol Support
    • Twisted.mail.SMTP.sendmail() Explained
    • Mail Exchange Lookups with MXCalculator
    • Using the ESMTPSenderFactory
      • Example
    • More Factories
      • Exercises
  • Providing Services with Twisted
    • Creating Listeners
    • Server Example
      • Exercises
    • Using the Twist Daemonizer (twistd)
    • Creating tac Files
    • Managing Services with twistd
    • Logging with twistd
  • Unit Testing with unittest (PyUnit)
    • About unittest (PyUnit)
    • The TestCase Class
    • TestCase Methods
    • Checking & Reporting Failures
    • Setting up Simple Tests
    • Compiling Test Suites
    • Working with TestResult Objects
    • Using TestLoader Objects
    • Exercises
  • Code Review
    • Code review checklist
    • https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/
    • Mergeable
    • Pass tests
    • What to do if code introduces new functionality
    • Check for code coverage with `make clean diff-cover`
    • Well formatted
      • make pep8
      • make diff_pylint_report
      • make cppcheck
      • make doc
      • make format` and manual fixing as needed.
    • What to do if command-line interface changes?
      • What requires a major version increment
    • File format changes
    • ChangeLog documentation
    • Spell checking
    • Plain text rules for tabs, spaces, indent, etc
    • Test streaming IO
    • Copyright year and other misc items
  • Globbing
    • Using Glob
    • Exercises
  • XML Processing
    • About XML
    • The ElementTree XML API
    • The Element Class
    • Using Elements
    • Creating New Elements
    • Xpath Style Queries
    • Creating & Saving XML Files

(Week 2 ends)

Week 3: Network Automation with Python

  1. Paramiko
    • DOCS: http://docs.paramiko.org/en/2.4/
    • Channel
    • Client
    • Message
    • Packetizer
    • Transport
    • Authentication & keys
    • SSH agents
    • Host keys / known_hosts files
    • Key handling
    • Parent key class
    • DSA (DSS)
    • RSA
    • ECDSA
    • Ed25519
    • GSS-API authentication
    • GSS-API key exchange
    • Other primary functions
    • Configuration
    • ProxyCommand support
    • Server implementation
    • SFTP
    • Miscellany
    • Buffered pipes
    • Buffered files
    • Cross-platform pipe implementations
    • Exceptions
  2. Netmiko
    • BaseConnection
    • DOCs: http://netmiko.readthedocs.io/en/latest/classes.html
  3. NAPALM
    • Installation
    • Tutorials
    • Validating deployments
    • Supported Devices
    • Command Line Tool
    • NetworkDriver
    • YANG
    • napalm-logs
    • Integrations
  4. Automating Ethernet and IP
    • STP
    • Trunking
      • VLAN
      • VXLAN
    • Port Channeling
    • ARP
  5. Automating Routing
    • BGP
    • OSPF
  6. Automating HA
    • HSRP
    • VRRP
    • GLBP
  7. Automating Dynamic DNS
    • DNS Primary / Secondary
    • Naming standards

Alta3 Research

3-Week Python Essentials


Duration: 5 Days (instructor-led)

Delivery: Onsite or Instructor-led Virtual

Price:
Onsite: Contact us for group quotes

Course Outline PDF: Download PDF

Buy Self-Paced

Buy Virtual