
Master coding guidelines and tooling for professional Python development by applying pep8, flake8, and black, using type annotations with mypy, and practicing debugging, packaging, and continuous integration.
Access the public GitHub repository to download course materials and code, install Python 3.10+ with pip for required packages, and set up Visual Studio Code with essential extensions.
Navigate to the downloaded project, locate the requirements.txt file, and install libraries with pip install -r requirements.txt. Create or activate a virtual or Anaconda Python environment before running the command.
Install and set up Visual Studio Code, turning it into a powerful IDE with extensions. Configure extensions, trust your workspace, select a Python interpreter, and run a helloworld script.
Learn pep8 coding conventions, including top-of-file imports and the three import blocks. Use four-space indentation and snake_case for variables and functions, CamelCase for classes, and uppercase constants.
Pep 8 guidelines organize imports into standard library, first-party, and third-party blocks to clarify origins and improve readability, while advocating per-line parameter formatting for clarity.
Learn how to configure VS Code for Python tooling, including flake8, pylint, black, isort, and mypy, via local settings in the .vscode directory and the pyproject.toml file, with extensions preinstalled.
Learn how isort sorts imports into future, standard library, third party, first party, and local folder blocks to align with pep8 guidelines, using a config file and CLI or extensions.
Explore why code linters are essential for large Python projects, and how tools like flake8, pylint, and ruff detect pep8 violations and naming issues to catch bugs early.
Compare flake8 and pylint as Python linters, highlight their checks and speed, and show how to configure them with dot files and the pyproject.toml, using rough as the workflow.
Explore Ruff, a Rust-based linter that replaces Flake8 and Pylint with blazing speed, configurable via pyproject.toml and VS Code extension, and supports fixing with --fix.
learn why formatters matter and how tools like black and rough enforce pep8 style, speeding up formatting thousands of lines and reducing manual tedium.
Discover why black is the industry-standard Python formatter and how its fixed style promotes consistency, with essential settings like line length, target version, and skip string normalization and trailing comma.
Explore the rough formatter, a blazing-fast drop-in replacement for black within the rough tool. Learn how to configure pyproject.toml, set line length, quotes, indentation, and how rough handles comments differently.
Explore a vector 2d class with x and y coordinates, implementing add, subtract, and multiply operations, plus dunder methods like __init__ and __str__, and note type annotations and doc strings.
Learn how to write and compare docstring styles—Google style, NumPy style, and rest style—covering parameters, returns, exceptions, and IDE rendering for Python libraries.
learn to lint docstrings with py doc style, install via pip, run with the Google convention flag, adjust config to ignore d300, and understand common docstring formatting issues.
Learn what Python type annotations are, added in Python 3.5, how they aid readers and static tools like mypy, and why they're not used at runtime.
Learn how to use Python type annotations and mypy for reliable code, covering parameter and return type hints, unions, and dunder methods with vector 2D examples.
Explore how Python type annotations detect type errors before runtime using mypy and pylance, showing how editors flag wrong argument types and speed up bug-free development.
Explore type annotations with union types in Python, including pre-3.10 typing.Union and the simplified 3.10 syntax, through int, float, and vector examples.
Explore type annotations with the typing module by using Any and Optional to handle arbitrary inputs and default none, and learn how mypy enforces type annotations.
Explore type annotations in Python 3.9, comparing the typing module to built-in list, dict, and tuple annotations, and note how static checkers like mypy validate them.
Learn to annotate lists in Python with type hints, enforcing lists of integers (and floats) in append operations, and understand that list length cannot be fixed by annotations.
Learn how to annotate tuples in Python, enforcing exact length and per-position types (int, float, string), and use ellipsis for any-length tuples, including unions from typing.
Annotate a function parameter as a Callable in Python, specifying input types and the return type (for example a list of integers → None) using typing or collections.abc.
Explore the changes to Python 3.10 type annotations, including the union and optional syntax, and use the pipe operator with lists, dicts, and tuples.
Annotate dictionaries by specifying key and value types, such as dict[str, int], use unions for types, and apply the collections mapping abstract base class for types like pandas data frames.
Explore how to annotate non returning functions with typing.NoReturn, covering sys.exit and always raising exceptions, and see how type annotations improve editor analysis in VS Code.
Explore how Python 3.10 introduces a type guard to refine type predicates in collections, enabling static type checkers to infer string or integer lists based on runtime checks.
Define a protocol to require the dunder length method, enabling type annotations for any object with a size, such as lists, tuples, dictionaries, and third-party types.
Explains generic functions using a repeat example and a type var from typing, returning a list of the input type, and shows bounded generics with size protocol.
Explore type annotation for generic classes, inheriting from the typing module's generic type, and instantiating with int and float to show type inference across methods and protocol bounds.
explore type annotations with namedtuple and TypedDict to model data: namedtuple provides read-only fields, while TypedDict offers fixed-key dictionaries with optional fields and autocompletion.
Explore Python 3.11 type annotations and literals, including literal integers and strings, how the type checker deduces hardcoded values, and the new literal string feature in typing.
Discover Python 3.12 changes: new generic type annotations with square brackets and a brand new generic type var, plus type dict for star-star kwargs.
Learn to use the pre-commit framework to enforce coding standards locally by running tools like black, isort, ruff, and mypy via git pre-commit hooks.
Configure a generated pyproject.toml with sections for black, isort, mypy, and ruff. Set line length, target python versions, and skip glob patterns, then enable checks gradually for codebases.
Demonstrate applying black, isodd, and rough to a large numpy project with pre-commit and pyproject configurations, and explore mypy and pyrite for type checks.
Master debugging Python in VS Code, including breakpoints and launch.json configurations, starting the debugger with F5, and inspecting variables, call stack, and the debug console.
Configure the Python debugger in VS Code by adding command line arguments to launch.json, passing age and name, and creating multiple debug configurations you can select from the dropdown.
Debug a Jupyter notebook in VS Code by starting the debugger from the cell that calls a function, without needing a launch.json, and inspect variables, the call stack, and breakpoints.
Learn to use VS Code tasks by configuring tasks.json to run Python files with arguments, including an entry-point main file, without the debugger, and invoking them with control shift B.
Explore timing Python code with the timeit module, using a timer with statement and setup strings, and compute mean times across repeats in microseconds, milliseconds, or nanoseconds.
Profile code to reveal which statements take the most time, not just the total execution. Decorate functions with a profiler, compare cProfile and alternatives, and visualize results with snakeviz.
Write unit tests for a Python vector class using the unittest framework, placing tests in a tests directory with test_vector, and verify results with assert equal while considering corner cases.
Use pytest to perform unit testing with parameterized tests for vector addition, including left-hand side, right-hand side, and expected results, and mark skips or raises for type errors.
Learn to build a Python package from a simple example, creating a my_package with __init__.py, a hello world function, and how to import it from outside.
Extend your Python package by adding module printing.py, move the print hello world function there, and learn to import from subpackages like my_package.printing or from a subdirectory with __init__.py.
Learn how to version and package a Python library using semantic versioning and major, minor, and patch numbers, expose public APIs, and structure subpackages with private modules and relative imports.
Structure a Python library named Fast Vector with vector and version subpackages, expose the vector class via __init__.py, and address imports and tests in packaging.
Explore a template python library on GitHub, clone it into VS Code, and review files like README and pyproject.toml to run unit tests and code coverage with pre-commit and black.
Configure a modern Python project with pyproject.toml, set up setuptools as the build system, and define metadata, dependencies, and dynamically read the version and readme content.
Generate HTML documentation from Python docstrings using MkDocs and the material theme, then build, serve locally, and publish to GitHub pages with a gh-pages deployment.
Explore pre-commit in a Python project template to run tools like black, autopep8, ruff, and mypy, and enforce checks via a GitHub workflow on pushes and pull requests.
Learn how to automate python package testing across Windows, Linux, and macOS using GitHub Actions, including setting up Python, installing dependencies, and running pytest with code coverage.
Calculate code coverage by running unit tests in the test directory, generating reports, and opening the index.html in a browser, then review coverage percentages and missing lines on CodeCAF.
Apply type annotations to future projects to streamline your Python workflow. Encourage colleagues to adopt these tools to make your Python life easier.
Course description:
In this course, you will explore coding guidelines and best practices, such as PEP8, as well as using popular Python tools like Pylint, Flake8, Autopep8, Black, and Pydocstyle. Additionally, you will learn about different docstring styles, such as Sphinx, Numpy, and Google, as well as using type annotations and the static type checker, MyPy. You will also gain practical experience in debugging, profiling, timing, and unit testing (TDD). Furthermore, you will learn how to create your own Python packages, modern HTML documentation using MkDocs and Google documentation strings, and how to use continuous integration tools like GitHub Actions for testing and code documentation.
The Course covers the following Topics:
Installing and setting up the software
The coding guidelines and good practice programming (PEP8)
The usage of Pylint, Flake8, Autopep8, Black and Pydocstyle
Different docstring styles for your code (sphinx, numpy and google)
The usage of type annotations and the static type checker MyPy
The usage of debugging, profiling, execution time measuring (timing) and unit testing (TDD)
The creation of own Python packages that can be uploaded to PyPi
The creation of a modern HTML documentation with mkdocs and google documenation strings
The usage of continouos integration tools (Github actions for testing and codedoc)
Step ahead in your Python career and join this course!
I hope will see you there!
Note:
In the course, Python is installed via Anaconda. If this is not possible for you, you can also install Python from other sources.