Python basics
Course Intro.
- About Iva E. Popova
- Course Resources.
Introduction to CLI, Terminal
- CLI and "terminal" overview
- Command Prompt Basics
- Current Working Directory (CWD)
- Viewing Folder Contents
- Navigating Through Folders
Python Introduction: interpreters, distributions, IDEs.
- What's the use of Python?
- Python distributions.
- Install and setting up Python (on Windows, Mac, Linux).
- Run Python Code in CLI
- Python IDEs and text editors.
- Write Python in VS Code
Core types: int, float, complex, strings. Variables.
- What's in a Python program?
- Numeric Types: integers, floating point numbers, and complex numbers.
- Python arithmetic.
- Strings. Common operations.
- Variables and naming conventions.
- How to comment our code?
- Exercises.
Basic IO. String formatting
- Escape Sequences.
- Basic IO.
- Formatted strings.
Booleans and Logical operations. Conditional Statements. Expressions and Operator precedence
- Boolean type.
- Logical operators.
- if:elif:else statements.
- Statement vs Expression in Python.
- Operator precedence.
- Exercises
Data structures: Sequence Types (list, tuple,range objects).
- Lists
- Tuples
- Range Objects
- Strings as sequence
Data structures: Dictionaries and Sets
- Dictionaries
- Operations with Dictionaries
- Sets
- Set Operations
Loops in Python: for, while, break, continue.
- while/do loops.
- for loops.
- break, continue.
Functions
- What are Functions?
- Function Definition
- Function Call
- Function Parameters (positional, keywords)
- Arguments unpacking - the
**
operator - Function Return Values
- Variables Scope
OOP: Classes, encapsulation, inheritance, operator overloading.
- OOP - Main Concepts
- Classes and Objects in Python
- Attributes
- Class Constructor
- Magic (dunder) methods
- Encapsulation and Data Hiding
- Inspecting Classes and Objects.
- Inheritance
- Method overriding
- Operator overloading
Exceptions: raising and handling
- What are Exceptions
- Exceptions Handling
- Handling different Exception Types
- Raising Exceptions
Iterators. Generators. Comprehensions
- Iterators in Python
- Iterables vs Iterators
- Creating custom Iterator Types
- Generators in Python
- Creating custom Generator function
- Custom Generator vs Custom Iterator - example
- List, dict and generator comprehensions
Functional topics: map/filter/reduce.
- map/filter/reduce.
Organizing code: imports, modules, packages
- Creating a custom Python modules
- Import module
- Module alias
- Import object from module
- Where
import
looks for a module? - Python's built-in and third-party modules
- Packages in Python
- Import-related module attributes (__name__, __file__)
Practicalities: Virtual Environments
- PIP - the Python Package Manager
- Python Virtual Environments
Practicalities: linting, formating, documentation
- Python Best Practises: PEP8 && PEP20
- Linters
- Formaters
- Documentation Conventions
Notable Standard Library Modules
- sys - interface with Python Interpreter
- command line arguments
Date and Time support
- datetime.date
- datetime.time
- datetime.datetime
- datetime.timedelta
Using the file-system
- Introduction to OS Module
- Basic Concepts: Paths and Current Working Directory
- Directory Manipulations
- Files Manipulations
Various formats handling
- Parse JSON
- Parse CSV
- Parse XML
Encoding. Unicode in Python
- Unicode Overview
- Python’s Unicode Support
- Encode-Decode Flow
- encode() and decode() functions
- base64
Reflection in Python
- dir(), type() and id() functions
- hasattr(), getattr() and setattr()
- isinstance() and issubclass() functions
- the
inspect
built-in module
Debugging Python applications
- How to Debug A Python Code?
- Overview of VSCode Debugger
- Debug menu
- Setup/Launch configurations
- Basic debug Commands (Start/Stop; Continue/Pause; Step Over/Into/Out; )
- Set Breakpoints
- Watch Variables
Regular Expressions in Python
- Regular Expressions Overview
- Regular Expressions in Python - the
re
module
Parallel programming: multithreading and multiprocessing
- Shape the concepts: multithreading, multiprocessing
- Example using the built-in multiprocessing module
Data science basics. Working with Numpy, Pandas and Jupyter Notebooks.
- Data Science process overview.
- Get familiar with numpy and pandas
- Working with Jupiter Notebook
Databases: SQLAlchemy
- What is an ORM?
- SQLAlchemy - the Python ORM
- Connect, Declare a Mapping,Create a Schema
- Demo example with SQLAlchemy and SQLite3
GUI: PyQt.
- PyQt - Overview
- Create a simple desktop GUI app with PyQt
Web Programming with Python. Django. FastAPI.
- An overview of Django -The (Python) web framework for perfectionists with deadlines.
- A demo example of ToDo List app with FastAPI
- A demo example of ToDo List app with Django