================================================================================
PYTHON FOR AUTOMATION & SCRIPTING — COMPANION SAMPLE FILES
Nolan Whitfield / Waskey Press
================================================================================

WHAT THIS PACKAGE CONTAINS
--------------------------

Unlike a data-driven book, this book's companion package isn't a dataset —
it's a set of small, safe, disposable sample files that let you actually run
this book's exercises against something concrete, without needing to point
any script at your own real files, backups, or logs on the first try.

  sample_messy_folder/     17 empty files across every extension category
                            used in Chapter 2's file organizer exercise
                            (Documents, Images, Videos, Archives, Code, Other)

  sample_backups/          10 fake backup_YYYYMMDD_HHMMSS.tar.gz files for
                            Chapter 3's backup retention exercise — 4 are
                            genuinely old (2025 dates), 5 are recent (2026,
                            within the last few weeks), and one has a
                            deliberately malformed filename to test the
                            find_old_backups() error-handling path directly.

  sample_sales_exports/    4 CSV files for Chapter 5's data validation
                            exercise — 2 are genuinely valid, one is missing
                            a required column, and one contains an invalid,
                            non-numeric amount value in one row.

  config/                  base.yaml, production.yaml, and staging.yaml,
                            ready to use directly with Chapter 11's layered
                            configuration loading exercise.

  sample_app.log           A 20-line syslog-style log file for Chapter 13's
                            log parsing exercise, verified directly against
                            this book's own SYSLOG_PATTERN regex: 18 lines
                            match correctly, and 2 lines are deliberately
                            malformed to demonstrate the "always report
                            unmatched lines" lesson from that chapter.


HOW TO USE THESE FILES
-----------------------

Every one of these files is designed to be pointed at directly by the code
in this book, unmodified. For example, to try Chapter 2's file organizer:

  from core.file_organizer import organize_directory
  organize_directory("./companion_files/sample_messy_folder")

Or Chapter 3's backup retention logic, in its default, safe dry-run mode:

  from core.backup_retention import delete_old_backups
  delete_old_backups("./companion_files/sample_backups", retention_days=30)
  # dry_run=True by default — this will only print what it would do

Or Chapter 13's log parser:

  from core.log_parser import parse_log_file
  entries = parse_log_file("./companion_files/sample_app.log", SYSLOG_PATTERN)


AN HONEST NOTE ON WHY THIS PACKAGE LOOKS DIFFERENT
-----------------------------------------------------

If you also picked up this series' companion volume, Python for Algorithmic
Trading, you'll notice its companion package included real (simulated)
price datasets, since that book's subject matter is fundamentally
data-driven. This book's subject is software engineering and infrastructure
automation — its "data" is code, configuration, and log lines, not numerical
series — so its companion package is a set of realistic sample files
instead of a dataset in the traditional sense. This isn't a lesser
companion package; it's the right kind of companion package for what this
specific book actually teaches.

All files in sample_messy_folder/ are empty placeholder files — their
names and extensions are what matters for the file-organizing exercise,
not their contents. All files in sample_backups/ are similarly empty;
Chapter 3's retention logic only needs to inspect filenames and (for a
real deployment) modification times, never file contents. The CSV and log
files, by contrast, contain genuine, realistic sample content, since
Chapter 5 and Chapter 13's exercises specifically need real data to
process.


LICENSE
-------

These sample files are provided free of charge for personal, educational
use alongside this book. They may be redistributed only as part of this
book's companion package, unmodified.

Questions or corrections: www.waskeypress.com
================================================================================
