Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Claudio Jolowicz

Rating No ratings yet

Keeping up with the Python ecosystem can be daunting. Its developer tooling doesn't provide the out-of-the-box experience native to languages like Rust and Go. When it comes to long-term project maintenance or collaborating with others, every Python project faces the same problem: how to build reliable workflows beyond local development while staying in sync with the evolving ecosystem. With this hands-on guide, Python developers will learn how to forge the moving parts of a Python project into an easy-to-use toolchain, using state-of-the-art tools including Poetry, Nox, GitHub Actions, Dependabot, pytest, mypy, pre-commit, Black, Ruff, and more. Author Claudio Jolowicz shows you how to create robust Python project structures complete with unit tests, static analysis, code formatting, type checking, and documentation as well as continuous integration and delivery. You'll learn how to: Create open source projects with state-of-the-art infrastructure Build a custom infrastructure for all Python projects in a company or team Improve and modernize the infrastructure of an existing Python project Evaluate modern Python tooling for adoption in existing projects Use tools for packaging and dependency management Automate common development tasks such as testing, dependency updates, and publishing releases

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on guide to turning Python's scattered developer tools into one coherent, reproducible project toolchain—from interpreter installation to CI/CD. Best for Python developers who maintain projects long-term, work in teams, or want to modernize an existing codebase. 【Book Arc】 - **Opening (~0%–15%)**: Frames the core problem—Python lacks the out-of-the-box tooling experience of Rust or Go—and begins with the foundation: installing and managing multiple Python interpreters across Windows, macOS, and Linux. - **Early (~15%–35%)**: Platform-specific installation mechanics (python.org installers, Homebrew, deadsnakes/apt, Pyenv) and the release cycle, so you can run several versions side-by-side and understand why you must test against a matrix. - **Middle (~35%–55%)**: Interpreter discovery and version management—PATH, the Windows and Unix `py` launchers, and Pyenv's shim model—covering the trade-offs (startup cost, interference with other tools) that shape later workflow choices. - **Late (~55%–80%)**: (Excerpts do not cover this range in detail.) Based on the blurb, this is where packaging, dependency management, and project structure with Poetry are expected to sit. - **Ending (~80%–100%)**: (Excerpts do not cover this range.) The blurb indicates automation and CI/CD—Nox, GitHub Actions, Dependabot, pytest, mypy, pre-commit, Black, Ruff, and release publishing—conclude the arc. 【Key Takeaways】 - **Python's tooling gap is the book's premise** (Opening): unlike Rust or Go, Python offers no single blessed workflow, so the reader must deliberately assemble one—this justifies the whole "forge a toolchain" approach. - **Supporting multiple Python versions is a habit, not an edge case** (Early): runtime environments often lag, and the annual release cycle with five-year support yields a testing matrix of roughly five active versions. Test early rather than panic-porting after a security advisory. - **Interpreter discovery is a real design decision** (Middle): PATH ordering, versioned `python3.x` commands, and launchers each have trade-offs; knowing them prevents subtle "wrong interpreter" bugs. - **Pyenv's shims are powerful but not free** (Middle): they add interpreter startup time and put deactivated commands on PATH, interfering with tools like `py`, `virtualenv`, `tox`, and Nox—and require `pyenv rehash` after installing entry-point scripts. - **Platform matters more than beginners expect** (Early): Debian/Ubuntu need the `-full` suffix to get virtualenv support; macOS framework builds and certificate installation are easy to overlook; Windows relies on the Registry rather than PATH. - **Entry points beat handcrafted shebangs** (Middle): the book flags shebang-based scripts as fragile and points to entry points as the sustainable alternative, previewing later packaging chapters. - **The end goal is reproducible workflows beyond local dev** (Opening): the stated payoff is robust project structure with tests, static analysis, formatting, type checking, docs, and CI/CD—not just a list of tools. 【Reading Tips】 - **Skim by platform**: if you develop on one OS, jump to your platform's section, but read the others lightly—the book argues cross-platform familiarity improves contributor experience. - **Deep-read the trade-off passages**: the Pyenv shim discussion and interpreter-discovery notes explain *why* tools conflict later; these are the highest-value conceptual bits in the excerpted range. - **Treat Chapter 1 as setup, not the point**: it's groundwork for the toolchain; don't stall here if your environment already works. - **Watch for the toolchain thread**: as you reach packaging and CI chapters, connect each tool back to the "reliable workflow" goal rather than memorizing commands. - **Note version-specific advice**: release-cycle details and installer behavior date quickly; verify against current Python docs. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book (installation, release cycle, interpreter discovery, Pyenv). Packaging, testing, static analysis, and CI/CD chapters are described only via the blurb and are not detailed here.
Page 4
ke advantage of these technologies long before the official release of these titles. This will be the first chapter of the final book. Please note that the G...
View in text
Page 10
cial release, or being subject to downstream modifications. They don’t require you to build the Python interpreter, which—​apart from taking precious time—​...
View in text
Page 15
nd line to install, upgrade, and uninstall Python versions. Homebrew includes security releases for older versions—​by contrast, python.org installers are pr...
View in text
Page 20
cOS and Linux. It includes a build tool—also available as a stand-alone program named python-build—that downloads, builds, and installs Python versions in yo...
View in text
Excerpt 5
vironment, and how your code interacts with the environment. Specifically, I’ll teach you how— ​and where— ​Python finds the modules you import. In the next...
View in text
Excerpt 6
dules, and entry-point scripts within the installation. The location for third-party modules is known as the site packages directory, and the location for en...
View in text
Excerpt 7
packages that may be pre-installed in the environment. NOTE Besides Pip, virtual environments may pre-install setuptools for the benefit of legacy packages t...
View in text
Excerpt 8
st and foremost, of a Python interpreter and Python modules. Consequently, there are two mechanisms that play a key role in linking a Python program to an en...
View in text
Tags
AI categories
PythonDevOpsProgramming
ISBN: 1098139585
Publisher: O'Reilly Media
Publish Year: 2023
Language: English
Pages: 77
File Format: PDF
File Size: 1.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…