In this course we will cover only the most useful features of the Python language and spend most of the time writing code. The goal is to quickly get up and running with practical skills. After the course, participants will be able to automate everyday tasks with simple Python scripts.
Outline
About labs/exercises
There are exercises available for all topics covered. Participants typically work on their own computers, but if necessary Code Sensei offers an online environment (Jupyter Lab).
Day 1
- Variables, Types, Operators
- Input, Output, Type Conversions
- Booleans and Conditional Execution (if)
- While loops
- Reading and writing text files
- Searching for text in a file
- Filtering text files
Day 2
- Functions
- Lists
- For Loops
- Import
- Reading and writing CSV files
- Correctly working with CSV headers
- Searching and filtering CSV files
- Running external commands
Day 3
- Dicts
- Tuples
- Exceptions
- Running python programs from the command-line
- Accepting command-line arguments
- Using Requests to consume REST API’s
Dag 4
- Pip and Virtual Environments
- Classes
- Imports and Packages
- Working with files from Python (e.g. copying, moving, deleting etc.)
- Generating text (e.g. reports, emails, invoices) using Jinja
- Reading and writing Excel files
Optional topics
Depending on your needs, we can cover additional topics, or replace some of the topics mentioned with others. Here are some suggestions:
- Sending emails
- Building a REST API with FastAPI
- Building a web site with Flask
- Connecting to databases with SqlAlchemy
- Git introduction
- Data analysis with Pandas
- Running commands remotely over SSH (netmiko)
- Using regular expressions to search and analyze data