CodeEssentials Python Series · Book 2

Practical Python in the AI Era

Build Real Programs with Automation, APIs, Testing, and AI-Assisted Coding.

Tested with Python 3.15

Build practical Python programs with automation, files, APIs, testing, debugging, and AI-assisted coding.

Paperback and Kindle · 8.5 × 11 in · Python 3.12 or newer

Cover of the book Practical Python in the AI Era

Who this book is for

You already know basic Python: variables, loops, functions, lists, and dictionaries. Now you want to build programs that do real work. This book takes you there, one practical program at a time.

  • Automate file and folder tasks safely, with a preview before anything changes
  • Work with files and data: CSV, JSON, dates, and exact money amounts
  • Handle bad input with exceptions and validation, and report what you skip
  • Build command-line tools with arguments, options, and exit codes
  • Call web APIs and use the JSON they return
  • Test your code with pytest, and debug real programs
  • See what is new in Python 3.15 that matters for everyday code
  • Use AI coding assistants well: check, test, and understand what they write

New to Python? Start with Python for Beginners, Book 1 of the CodeEssentials Python Series.

Download Companion Files

Download the code, sample data, projects, exercises, and supporting files for Practical Python in the AI Era.

Download Source Files (.ZIP)

ZIP · 149 KB · version 2026-10-09 · Chapters 1 to 15, Projects 1 to 5, and answers to every exercise

The solutions to the projects' Change It tasks are added to the same download when they are finished. Every file in it was run on Python 3.12, 3.13, 3.14, and the 3.15 release candidate before it was published here.

Five practical projects

Each project is printed in full in the book, so you can build it from the page. 5 of the 5 are in the download today.

  1. 1

    Smart File Organizer

    Sorts a messy Downloads folder into categories, with a preview first, no overwrites, and a report.

    In the download
  2. 2

    Text & Log Analyzer

    A command-line tool that counts log levels, finds repeated messages, and reports malformed lines.

    In the download
  3. 3

    Expense Tracker

    Imports a bank CSV export, rejects bad rows, and summarizes by month and category, with exact Decimal money.

    In the download
  4. 4

    Contact Manager

    A command-line contact book with validation, search, duplicate checks, and safe JSON storage, plus tests.

    In the download
  5. 5

    Command-Line Task Tracker

    A to-do tool with due dates, status filters, stable task ids, safe JSON storage, and a full test suite.

    In the download

Send me the toolkit

Every reader gets Keep Building, a free toolkit for the book: three level-up challenges for each of its five projects, ten programs to build next, the AI-code review checklist, and the resources to keep going. Enter your email and we'll send the PDF straight to your inbox.

We'll send the toolkit plus a short series of practical Python tips. Unsubscribe anytime with one click. We never share your email.

Book details

Publisher
CodeEssentials Books
Series
CodeEssentials Python Series
Book
2
Format
Paperback + Kindle
Interior
Black & white
Trim size
8.5 × 11 in
Python
3.12 or newer
Python 3.15
Tested with Python 3.15
Projects
5 practical projects