Automation with Python
Course Description
This course teaches Python 3 from the ground up and uses this to automate a variety of tasks. This includes document manipulation, web scraping, sending emails and data processing.
3 Days
Contact us for pricing
Prerequisites
No specific pre-requisites. Previous programming experience an advantage.Python basics
The Python environmentVariables
Keywords
Built in functions
Variable types
Flow Control
if and elifConditional expressions
Relational operators
Boolean operators
while loops
Alternate ways to exit a loop
Functions
Defining a functionFunction parameters
Global variables
Variable scope
Returning values
Lists and Tuples
About sequencesLists
Tuples
Indexing and slicing
Iterating through a sequence
Functions for all sequences
Using enumerate
Operators and keywords for sequences
The xrange() function
Nested sequences
List comprehensions
Generator expressions
Working with files
Text file I/OOpening a text file
The with block
Reading a text file
Writing to a text file
"Binary" (raw, or non-delimited) data
Exception handling
ExceptionsHandling exceptions with try
Handling multiple exceptions
Handling generic exceptions
Ignoring exceptions
Using else
Cleaning up with finally
re-raising exceptions
Raising a new exception
The standard exception hierarchy
Dictionaries and sets
About dictionariesWhen to use dictionaries
Creating dictionaries
Getting dictionary values
Iterating through a dictionary
Reading file data into a dictionary
Counting with dictionaries
About sets
Creating sets
Working with sets
Classes
Defining classesInstance objects
Instance attributes
Methods
__init__
Properties
Class data
Inheritance
Multiple Inheritance
Base classes
Special methods
Pseudo-private variables
Static methods
OS Commands
shutil Module and File CopiesDeletion
Walking the tree
Playing with zip files
Extracting from zips
Creating zip files
The os module
Scheduling tasks
Environment variables
Launching external processes
Paths, directories, and filenames
Walking directory trees
Dates and times
Pattern Matching with Regular Expressions
Creating regex ObjectsMultiple Matching Groups with |
zero or one match ?
zero or more match *
one or more +
Repetitions {}
Greedy Matches & findall
Character Classes
Matching Newlines
Review of regex Symbols
XML and JSON Processing
Loading XML dataTraversing document tree
Searching XML document
Writing XML output
Reading and Writing JSON output
Working with Excel
Working with Excelexample.xlsx
Getting Sheets from the Workbook
Getting Cells from the Sheets
Getting Rows and Columns from Sheets
Writing Excel Documents
Playing with Fonts
Dimensions
Merging Cells
Working with PDF & word documents
Working with .pdf & .docxExtracting Text from PDFs
Rotating PDFs
Reading Word Documents
Driving the styles
Writing Word Documents
Web scraping
Web Scrapingwebbrowser module
requests module
BeautifulSoup
CSS Selectors
Finding an Element with the select() Method
Getting data from an Element’s Attributes
Controlling your browser with Selenium
Working with CSV and JSON
Working with CSV and JSONExtracting Text from CSV files
Reader Objects in a for Loop
Writer Objects
Delimiters and line terminators
Reading JSON with loads()
Writing JSON with the dumps()
REST APIs and JSON
REST API returns
Keeping Time, Scheduling Task & Launching Programs
time Moduledatetime Module
timedelta
datetime conversion to strings
strings to datetime objects
Threading
Sending Email & text messages
smtplib Moduleimapclient Module
pyzmail Module
Searching Email
twilio
Networking with Python
SocketsSending/receiving messages
PythonPython ProgrammingPython automationPython automatingPython 3