Course Info
Main advantage | Enhance Python proficiency in your company to enable developers to write code that is not only better but also easier, faster, and more cost-effective to maintain. |
Duration | a) half-days: 5 days x 4 hours (including breaks) b) full-days: 3 days x 7 hours (including breaks) |
Format | workshop (70% workshop / 30% lecture) |
Venue | a) online or b) client’s office or other place chosen by the client, in Europe |
Enrollment | in-house course for a group of people within one company |
Group size | up to 10 delegates |
Course language | English, Polish or both during the same training |
Course Syllabus
- Advanced Tooling
- Multiple Python Installations
- Common Caveats with Python Installation on Windows (i.e. Python not on %PATH%)
- IDEs (Integrated Development Environments)
- Overview of Most Important IDEs (PyCharm, Visual Studio Code with Python Plugin and Jupyter Notebook)
- Using Visual Studio Code: Program Layout, Installing Python Plugin, Accessing Terminal, Changing Default Terminal, Turning On Auto-Save etc.
- IPython
- Jupyter Notebook: Installation, Use Cases, Auto-Completion, Displaying Inline Documentation, Restarting Underlying IPython Session, Integration with Matplotlib, Support for Different Kernels, nbextensions, Table of Contents, Exporting Notebooks to HTML and Python Code etc.
- Version Pinning
- pip Package Manager and PyPi Repository
- Isolated Python Installations with virtualenv
- Anaconda Distribution
- conda Package Manager and Anaconda Repository
- Isolated Python Environments with conda
- Anaconda vs “Pure” Python Installation
- conda vs pip
- Python Releases
- Python 2 vs Python 3
- Main Differences between Python 2 and 3
- Porting Python 2 to 3
- Python Documentation
- PEP8 for Formatting Rules
- Functions
- Positional and Named Arguments
- Returning Multiple Values
- Default Values
- Default Value Trap
- Lambdas
- Sorting by Key
- Global and Local Scope
- Global Keyword
- *args in Function Signature, Function Call and Other Places
- **kwargs in Function Signature, Function Call and Other Places
- Positional Only Arguments
- Function Annotations
- Introduction to Static Typing with mypy
- Nonlocal Scope and nonlocal Keyword
- callable Function
- Introduction to Nested Functions and Closures
- Decorators
- Decorator Syntax, Definition and Usage
- Simple Decorators for Registering Functions
- Nested Functions
- Closures
- Non-parametrised Decorators Delegating to the Decorated Function
- Class-based Implementation of the Above
- Proper Argument Passing
- Parametrised Decorators with Three Nested Functions
- Class-based Implementation of the Above
- Decorating Methods
- Decorating Classes
- Template Method Design Pattern as one of the Use Cases
- Decorator Use Cases
- Intermediate Object Oriented Programming (we skip easier topics if the group is advanced enough)
- __str__ vs __repr__
- __str__ Method vs str() Function
- Classes Imitating Functions with __call__ Special Method
- Encapsulation – Interface vs Implementation
- Protected Attributes
- Private Attributes
- Read-Only @property
- Read-and-Write @property
- Introducing Encapsulation to an Existing Class without Breaking the Interface with @property
- Variable Annotations
- Dataclasses: Usage, Default Values, Default Values Trap, Default Value Factory, Fields Customisation, __post_init__
- Introduction to Single Inheritance
- Attribute Lookup Mechanism
- Code Reusage with Inheritance
- Method Overloading
- super()
- Advanced Object Oriented Programming
- Special Methods Recap
- object Class
- defaultdict Data Structure
- Inheriting from Builtin Classes, i.e. Data Structures
- @classmethod
- Alternative Constructors with @classmethod
- @staticmethod
- Descriptors
- Bound vs Unbound Method
- Slots
- Including __dict__ in Slots
- Abstract Base Classes
- Multiple Inheritance: Fundamentals, MRO (Method Resolution Order), Diamond Problem, super() Behaviour
- Mixin Classes
- Metaclasses: type Metaclass, Writing Your Own Function-based and Class-based Metaclasses, Use Cases, Simpler Approaches
- Iterators
- Iteration Protocol
- Iterable vs Iterator
- Class-based Implementation of One-Time Iterable
- Class-based Implementation of Reusable Iterable
- Generators (only in 5 days-long version)
- Generators and yield Instruction
- Iteration over Generators
- Generators vs Iterators
- Generator-based Implementation of One-Time Iterable
- Generator-based Implementation of Reusable Iterable
- Passing Data to a Generator
- Introduction to Coroutines
- Advanced Code Organisation
- Modules
- Three Import Styles
- Renaming in Imports
- Import vs Execution and __name__ Variable
- Module Search Order
- sys.path List
- PYTHONPATH Environment Variable
- Packages
- Packages Initialisation
- __init__ Files
- Relative Imports
- Packaging and Publishing Python Code (only in 5 days long version)
- requirements.txt
- setup.py
- PyPI
- Wheel Format
- Packaging Python Projects with setuptools and Generating Distribution Archives
- Semantic Versioning
- twine for Automating Publishing Python Packages
- Testing with pytest
- What Testing is for?
- Overview of Available Frameworks (unittest vs pytest vs doctest)
- pytest Fundamentals
- Launching Tests
- Fail Fast Mode (-x Switch)
- Printing Local Variables (-l Switch)
- Quiet Output (-q Switch)
- Testing both Happy and Sad Paths
- Testing Edge and Corner Cases
- Fixtures
- Unique Temporary Directory for Test Run
- Fixtures Scopes – Sharing Fixture Instances between Tests
- Fixture Dependencies
- Fixture Finalisation
- Grouping Tests into Classes
- Skipping Tests
- Parallel Programming (only in 5 days long version)
- threading Module
- Creating, Starting and Joining Threads
- Producent and Consument Pattern
- Communication via Queues
- Daemon Threads
- Proper Threads Starting and Joining
- concurrent.futures Module
- pool.map
- pool.submit
- Global Interpreter Lock
- Parallelisation of IO Operations vs Computations
- ThreadPoolExecutor vs ProcessPoolExecutor
- Measuring Time Execution
- Debugging Multithreaded Programs in PyCharm
- Regular Expressions (only in 5 days long version)
- Idea of Regular Expressions
- Limitations
- re Module
- re.search() vs re.match()
- re.findall()
- Pattern Compilation
- Making Long Patterns more Readable with re.VERBOSE
- Extracting Data with Unnamed Groups and Named Groups
- Matching to the Beginning and End of String (^ and $)
- Optional Elements (?), One-or-More Repetition (*) and Zero-One-or-More Repetition (*)
- Advanced Repetition with {}, {n,}, {,n} and {n,m} Syntax
- Alternative with [] and (a|b) Syntaxes
- Character Groups with [a-z]
- Negation with [^]
- Character Classes: \d, \D, \s, \S etc.
- Escaping
- Syntax Cheat Sheet
- Processing Files with Regular Expressions
- Using and Creating REST APIs (only in 5 days long version)
- Recap of JSON, JSON Data Types, Loading and Dumping JSON in Python
- Using Postman for Accessing Web APIs
- YAML Format
- Loading and Dumping YAML Format
- JSON Schema
- Validation with jsonschema
- Loading JSON to Your Own Classes with dataclasses-jsonschema
- Flask Web Application Structure
- Starting and Stopping Flask Development Server
- flask_restful Library
- Miscellaneous (only in 5 days long version)
- Persistence with Pickle
- Working with Files and Directories
- Launching and Controlling Subprocesses in a Blocking Way
- Launching and Controlling Subprocesses in a non-blocking Way
- Reading and Writing CSV Files with builtin csv Module
- Reading and Writing CSV and Excel Files with pandas
Benefits for the Sponsor
As the course sponsor or HR you get:
- Analysis of the needs and my help to choose or design a great course during a phone call with the sponsor, HR, team leader or/and course delegates. On top of that, we ask delegates on the very first day what their needs are, to make even better usage of the course time.
- Course customisation to your needs.
- Guaranteed expert instruction from a professional with experience at Google.
- Course evaluation as an electronic form at the end of the last course day. The evaluation results are sent to interested people (most of often they’re course sponsor and HR).
- Simple communication – you can contact the trainer directly by phone or email.
- Easy buying procedure – one call or email is enough to get offer and to book a date. I don’t do overbooking. The course is confirmed once you send the Purchase Order.
- Friendly business partner – as a rule, I treat all my clients like friends. I don’t build walls, I’m not pretending to be a huge training company and I write in first person.
Clients very often decide to order other training (including dedicated courses) after observing positive results of this course.
Benefits for Delegates
Delegates will benefit because of:
- Support after the course, via email and phone.
- Pre-course setup instructions to save time at the start. I’m happy to help you via email, phone or Skype, zoom.us etc. in case of any questions or issues.
- Course materials consisting of code snippets, comments, exercises and solutions. The entire courseware is a single web page which make it very easy to lookup something there. Courseware is available online during and after the training. Delegates can download it to use it offline. Courseware can be updated during the course in real time, so that we can include comments or entire new sections suggested by delegates.
- Environment ready to use after the course – we don’t use virtual machines. Instead, we install everything on delegates machines, so that they can reuse the same setup after the course.
- Recording of the training (in case of online training)