Type Here to Get Search Results !

Hypermodern Python Tooling in pdf


Download Hypermodern Python Tooling by Claudio Jolowicz in EPUB

If you’ve picked up this book, you likely have Python installed on your machine already. Most common operating systems ship with a python or python3 command. 

This can be the interpreter used by the system itself or a shim that installs Python for you when you invoke it for the first time.

Why dedicate an entire chapter to the topic if it’s so easy to get Python onto a new machine? 

The answer is that installing Python for long-term development can be a complex matter, and there are several reasons for this:

You generally need multiple versions of Python installed side-by-side. (If you’re wondering why, we’ll get to that shortly.)

There are a few different ways to install Python across the common platforms, each with unique advantages, tradeoffs, and sometimes pitfalls.

Python is a moving target: You need to keep existing installations up-to-date with the latest maintenance release, add installations when a new feature version is published, and remove versions that are no longer supported. 

You may even need to test a prerelease of the next Python.

You may want your code to run on multiple platforms. While Python makes it easy to write portable programs, setting up a developer environment requires some familiarity with the idiosyncrasies of each platform.

You may want to run your code with an alternative implementation of Python.1

In this first chapter, I’ll show you how to install multiple Python versions on some of the major operating systems in a sustainable way, and how to keep your little snake farm in good shape.a

Book description

Keeping up with the Python ecosystem can be daunting. Its developer tooling doesn't provide the same 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, GitHub Actions, Dependabot, pytest, mypy, Flake8, 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 releases, checks and tasks, dependency updates, Python syntax upgrades, and releases to PyPI and TestPyPI

And much more

Table of contents

1. Installing Python

Supporting Multiple Versions of Python

Locating Python Interpreters

Installing Python on Windows

The Python Launcher for Windows

Installing Python on macOS

Homebrew Python

The python.org Installers

Installing Python on Linux

Fedora Linux

Ubuntu Linux

Other Linux Distributions

The Python Launcher for Unix

Installing Python with Pyenv

Installing Python from Anaconda


2. Python Environments

Contents of a Python Environment

The Interpreter

Python Modules

Entry-point Scripts

The Layout of Python Installations

The Per-User Environment

Virtual Environments

Activation Scripts

Installing Applications with Pipx

Finding Python Modules

Module Objects

The Module Cache

Module Specs

Finders and Loaders

The Module Path

Site Packages


3. Python Packages

An Example Application

Why Packaging?

Packaging in a Nutshell

Installing Projects from Source

Building Packages with build

Uploading Packages with Twine

The pyproject.toml File

Build Frontends and Build Backends

Wheels and Sdists

Project Metadata

Naming Projects

Versioning Projects

Single-Sourcing the Project Version

Entry-point Scripts

Entry Points

Authors and Maintainers

The Description and README

Keywords and Classifiers

The Project URLs

The License

The Required Python Version

Dependencies and Optional Dependencies


4. Dependency Management

Example: Consuming an API with HTTPX

Example: Console Output with Rich

Specifying Dependencies for a Project

Version Specifiers

Extras and Optional Dependencies

Environment Markers

Development Dependencies

Requirements Files

Locking Dependencies

Freezing Requirements with pip

Pinning Dependencies with pip-tools


5. Managing Projects with Poetry

Installing Poetry

Creating a Project

The Project Metadata

The Package Contents

The Source Code

Managing Dependencies

Caret Constraints

Extras and Environment Markers

The Lock File

Updating Dependencies

Managing Environments

Development Dependencies

Package Repositories

Extending Poetry with Plugins

Generating Requirements Files with the Export Plugin

Deploying Environments with the Bundle Plugin

The Dynamic Versioning Plugin


6. Testing with pytest

Writing a Test

Designing for Testability

The unittest Framework

The pytest Framework

Advanced Techniques for Fixtures

Extending pytest with Plugins


7. Measuring Coverage with Coverage.py

The standard trace module

Using Coverage.py

Measuring across Multiple Environments

Parallel Coverage

Measuring in Subprocesses

Setting a Coverage Target


About the Author

About the book:

Title: Hypermodern Python Tooling

Author(s): Claudio Jolowicz

Release date: April 2024

File : EPUB, 12MB


Free Download the Book: Download Hypermodern Python Tooling by Claudio Jolowicz in PDF

PS: Share the link with your friends

If the Download link is not working, kindly drop a comment below, so we'll update the download link for you.

Happy downloading!

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.