Mastering Python, 2nd Edition

Mastering Python, 2nd Edition
Mastering Python, 2nd Edition
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 5h 21m | 785 MB

Unlock the power of Python by learning effective application development strategies

Python is one of the most powerful, flexible, and popular programming languages in the world. It comes with all new features in version 3.5. With Python, you can write code that is efficient, maintainable, and reusable.

In this second edition of the course, we cover the basics of operating in a Python development environment as well as the advanced topics. We present you with real-world solutions to Python 3.5 and advanced-level concepts such as reactive programming and microservices, introduce ctypes and Cython tools.

You don’t need to be familiar with the Python language as we start with Python primer and move on to explain what’s new in Python 3.5. You’ll get ready to install, create packages, and run them on the command line. Throughout the journey, we’ll highlight the major aspects of managing your Python development environment, show you how to handle parallel computation, and help you to master asynchronous I/O with new Python 3.5 to improve the performance of your system.

Finally, you’ll learn the secrets of metaprogramming and unit testing in Python—arming you with the perfect skillset to be a Python expert. This course will get you up to speed in everything from basic programming practices to high-end tools and techniques, things that will help you set apart as a successful Python programmer.

What You Will Learn

  • Get to grips with the basics of operating in a Python development environment
  • Build Python packages to efficiently create reusable code
  • Become proficient at creating tools and utility programs in Python
  • Use the Git version control system to protect your development environment from unwanted changes
  • Harness the power of Python to automate other software
  • Distribute computation tasks across multiple processors
  • Handle high I/O loads with asynchronous I/O to get a smoother performance
  • Take advantage of Python’s metaprogramming and programmable syntax features
  • Get acquainted to the concepts behind reactive programming and RxPy
Table of Contents

Python Primer
1 The Course Overview
2 Python Basic Syntax and Block Structure
3 Built-in Data Structures and Comprehensions
4 First-Class Functions and Classes
5 Extensive Standard Library
6 New in Python 3.5

Setting Up
7 Downloading and Installing Python
8 Using the Command-Line and the Interactive Shell
9 Installing Packages with pip
10 Finding Packages in the Python Package Index

Making a Package
11 Creating an Empty Package
12 Adding Modules to the Package
13 Importing One of the Package-s Modules from Another
14 Adding Static Data Files to the Package

Basic Bbest Practices
15 PEP 8 and Writing Readable Code
16 Using Version Control
17 Using venv to Create a Stable and Isolated Work Area
18 Getting the Most Out of docstrings 1- PEP 257 and docutils
19 Getting the Most Out of docstrings 2- doctest

Making a Command-Line Utility
20 Making a Package Executable via python -m
21 Handling Command-Line Arguments with argparse
22 Interacting with the User
23 Executing Other Programs with Subprocess
24 Using Shell Scripts or Batch Files to Run Our Programs

Parallel Processing
25 Using concurrent.futures
26 Using Multiprocessing

Coroutines and Asynchronous I/O
27 Understanding Why This Isn-t Like Parallel Processing
28 Using the asyncio Event Loop and Coroutine Scheduler
29 Waiting for Data to Become Available
30 Synchronizing Multiple Tasks
31 Communicating Across the Network

Metaprogramming
32 Using Function Decorators
33 Function Annotations
34 Class Decorators
35 Metaclasses
36 Context Managers
37 Descriptors

Unit Testing
38 Understanding the Principles of Unit Testing
39 Using the unittest Package
40 Using unittest.mock
41 Using unittest-s Test Discovery
42 Using Nose for Unified Test Discover and Reporting

Reactive Programming
43 What Does Reactive Programming Mean?
44 Building a Simple Reactive Programming Framework
45 Using the Reactive Extensions for Python (RxPY)

Microservices
46 Microservices and the Advantages of Process Isolation
47 Building a High-Level Microservice with Flask
48 Building a Low-Level Microservice with nameko

Extension Modules and Compiled Code
49 Advantages and Disadvantages of Compiled Code
50 Accessing a Dynamic Library Using ctypes
51 Interfacing with C Code Using Cython