New
High Performance Python
Practical Performant Programming for Humans
by Ian Ozsvald, Micha Gorelick
Pages
593
Published
2019
A practical guide to automating everyday tasks with Python — no prior experience required
Stop doing by hand what Python can do for you: learn to automate files, spreadsheets, PDFs, web scraping, and more with real working scripts.
Automate the Boring Stuff with Python teaches you to write programs that do in minutes what would take you hours to do manually. Al Sweigart walks you through Python fundamentals and then immediately applies them to practical automation tasks: manipulating files and folders, reading spreadsheets, scraping websites, filling out forms, and scheduling jobs. Every chapter builds a tool you can actually use — no toy examples, no academic exercises.
Most programming books teach you syntax. This one teaches you to get things done. Al Sweigart starts from the ground up — no prior programming experience assumed — and moves quickly to the automation tasks that make Python worth learning in the first place.
The second edition, published in 2019, covers Python 3 throughout and adds new chapters on input validation, Gmail and Google Sheets integration, and updates to every project so the code runs against current libraries. The 593-page book is structured in two halves: a focused crash course in Python fundamentals, followed by a project-driven tour of automation topics that most developers encounter in their day-to-day work.
Each chapter closes with a working, useful program. By the time you finish, you will have built tools that rename hundreds of files according to a naming scheme, pull data from websites without a browser open, send scheduled email reports, read and write Excel spreadsheets without Excel installed, and manipulate PDFs in bulk. These are not demonstrations — they are scripts you can adapt and deploy the same day.
The automation topics covered include:
Sweigart writes the way a patient senior developer explains things: plainly, without jargon, always with a concrete reason for each technique. If you spend any part of your week on repetitive computer work — renaming files, copying data between spreadsheets, filling in web forms — this book will pay for itself the first time you run one of its scripts.
Install Python and write your first programs. Learn variables, data types, expressions, and how to run scripts from the command line.
Control what your programs do with if statements, loops, and logical operators. Build scripts that make real decisions based on input.
Organize code into reusable functions, understand scope, and learn how to structure scripts so they are readable and maintainable.
Store and manipulate sequences of data with lists. Work through practical examples involving sorting, searching, and iterating over collections.
Use dictionaries and tuples to represent structured records and build small data-processing programs that go beyond simple lists.
Write regular expressions to search, validate, and transform text. Apply them to real tasks like extracting phone numbers and email addresses from documents.
Read, write, and manage files and directories on your computer. Build scripts that automate folder organization and bulk file renaming.
Fetch web pages with the Requests library and parse their content with Beautiful Soup. Automate form submission and site navigation with Selenium.
Read and write spreadsheet data without opening Excel or a browser. Automate data extraction, transformation, and reporting across multiple files.
Extract text from PDFs, generate Word documents programmatically, and send automated emails with attachments using Python's standard libraries and Gmail integration.
No prior experience is required. The book opens with a Python crash course that covers everything you need before moving into automation projects. Many readers with no coding background have worked through it successfully.
The second edition uses Python 3 throughout. All code examples and project scripts are written for Python 3, and the book includes instructions for installing it on Windows, macOS, and Linux.
Yes. The first few chapters will be a quick review, but the bulk of the book covers applied automation topics — web scraping, spreadsheet manipulation, PDF handling, scheduling — that most introductory courses never touch.
Al Sweigart makes the book's source code available on the companion website listed in the book itself. No Starch Press also provides access through its website. Check the edition's front matter for the current URL.
Neither. This book is specifically about automating desktop and administrative tasks: files, documents, web scraping, email, and scheduling. It is not a web framework tutorial or a data analysis guide.
The core automation techniques and Python 3 syntax remain accurate. A small number of third-party library APIs may have changed since publication, but the underlying patterns and the majority of code examples still run without modification.
New
Practical Performant Programming for Humans
by Ian Ozsvald, Micha Gorelick
New
A thorough reference to Python language fundamentals, from syntax and data types to classes and advanced tools
by Mark Lutz
New
A Hands-On, Project-Based Introduction to Programming in Python
by Eric Matthes
New
A Concise Desktop Reference for Python 3 — Language, Libraries, and Best Practices
by Alex Martelli, Anna Martelli Ravenscroft, Paul McGuire, Steve Holden