Who Should Read This Book and Why
Coding Style and Automated Checks
2
MODULES, LIBRARIES, AND FRAMEWORKS
The External Libraries Safety Checklist
Protecting Your Code with an API Wrapper
Package Installation: Getting More from pip
Doug Hellmann, Python Core Developer, on Python Libraries
3
DOCUMENTATION AND GOOD API PRACTICE
Getting Started with Sphinx and reST
Marking Deprecated Functions with the warnings Module
Christophe de Vienne on Developing APIs
4
HANDLING TIMESTAMPS AND TIME ZONES
The Problem of Missing Time Zones
Building Default datetime Objects
Time Zone–Aware Timestamps with dateutil
Serializing Time Zone–Aware datetime Objects
The Wheel Format Distribution Standard
Sharing Your Work with the World
Creating Objects Used in Tests with Fixtures
Controlled Tests Using Mocking
Revealing Untested Code with coverage
Setting Up a Virtual Environment
Using Different Python Versions
Decorators and When to Use Them
Mixing Static, Class, and Abstract Methods
Putting Implementations in Abstract Methods
Returning and Passing Values with yield
Functional Functions Functioning
Applying Functions to Items with map()
Getting Indexes with enumerate()
Finding Items That Satisfy Conditions with any() and all()
9
THE ABSTRACT SYNTAX TREE, HY, AND LISP-LIKE ATTRIBUTES
Writing a Program Using the AST
Extending flake8 with AST Checks
Checking for the Correct Decorator
Paul Tagliamonte on the AST and Hy
10
PERFORMANCES AND OPTIMIZATIONS
Understanding Behavior Through Profiling
Disassembling with the dis Module
Defining Functions Efficiently
Achieving Zero Copy with the Buffer Protocol
Victor Stinner on Optimization
Multithreading in Python and Its Limitations
Multiprocessing vs. Multithreading
Interprocess Communication with ZeroMQ
12
MANAGING RELATIONAL DATABASES
RDBMSs, ORMs, and When to Use Them
Streaming Data with Flask and PostgreSQL
Writing the Data-Streaming Application
Using six for Python 2 and 3 Support
Using Python Like Lisp to Make a Single Dispatcher
18.116.36.194