CodeEssentials Python Series · Book 2

Practical Python in the AI Era

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

Updated for Python 3.15

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

Coming Soon on Amazon Download the source files

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

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 · 65 KB · version 2026-09-27 · Chapters 1 to 8 and Projects 1 to 3

The files for the remaining chapters and projects are added to the same download as 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. 3 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

    Contacts with search, tags, CSV import and export, and JSON storage.

    In progress
  5. 5

    Command-Line Task Tracker

    A to-do tool with due dates, priorities, filters, and a full test suite.

    In progress

Bonus Materials

Coming Soon

Additional exercises, project extensions, and bonus resources will be available here.

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
Updated for Python 3.15
Projects
5 practical projects