liveBook · Manning

Pathlib

pathlib is a Python standard-library module providing object-oriented classes and operations for representing and manipulating filesystem paths.

How 2 Manning books explain it

The Quick Python Book, Fourth Edition

pathlib is a Python standard-library module that provides object-oriented classes and operations for representing and manipulating filesystem paths.

How it is used
Uses Path objects to handle filesystem locations and operations, including file searches and archiving.
How deep it goes
Works through path properties and filesystem methods, then combines them in scripts; defers the full method catalog to the documentation.
Examples
Demonstrates path components, recursive .test file-size totals, and a dated archive for matching text files.
What you can do after
Build it from scratch: search for matching files, inspect them, and move them into a created directory with pathlib.

Read how The Quick Python Book, Fourth Edition explains pathlib →

Build Python Web Apps with Streamlit

pathlib is Python's standard library module for object-oriented filesystem path manipulation.

How it is used
Builds deployment-safe paths for loading files beside a Python script.
How deep it goes
Explains Path construction, resolution, directory selection, joining, and pandas handoff through a complete loader.
Examples
Uses data_loader.py, sales_data.csv, BASE_DIR, SALES_DATA_PATH, and pandas.read_csv.
What you can do after
Build deployment-portable CSV paths and pass them directly to pandas.read_csv.

Read how Build Python Web Apps with Streamlit explains pathlib →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.