Leanpub Header

Skip to main content

Python at work

The Beginner’s Guide to Writing Professional Code. Fundamentals, Recipes, and Real-World Projects

Python at work
This book is 100% completeLast updated on 2026-10-11

Learn Python the way it’s actually used at work. Start from zero, automate real office tasks, build APIs and data reports, and master the habits that turn a beginner into a hireable professional.

Minimum price

$24.99

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
About

About

About the Book

**Learn Python the way it's used at work: from your first line of code to tested, professional tools your colleagues can rely on.**

Most beginner books teach you how to make a computer do things. *Python at Work* teaches you how to make it do things someone will pay you for.

You'll start from zero, with no programming experience needed, and build real skills step by step. From the very first chapter, you'll also learn the habits that separate hobby code from production code: clear naming, handling errors properly, never storing money as a float, testing before you hand code over, and writing scripts that still work next month on someone else's machine.

### Learn inside a real company

Throughout the book you join **Brightline Logistics**, a fictional mid-sized company, as a junior analyst learning Python. Your colleagues bring you the problems new developers really face: spreadsheets copied by hand every morning, reports that must add up to the cent, messy customer data, a nightly import that crashes on one bad row. You solve each one, chapter by chapter.

### What's inside

- **30 chapters in three parts:** *Foundations*, *Writing Professional Code*, and *Real-World Projects*

- **100+ recipes:** short, reusable solutions in a Problem → Solution → How it works format

- **30 "On the Job" projects:** one complete mini-project closing every chapter

- **20 clear, carefully designed diagrams** of the ideas that are easier to see than to read

- **Common Mistakes boxes** covering the traps that catch almost every beginner

- **Exercises in every chapter**, with solutions to selected ones

- **5 appendices:** a Python quick reference, common error messages and how to fix them, 20 interview questions with model answers, exercise solutions, and a workstation setup checklist

- **A complete glossary** of the terms you'll hear at work

### What you'll be able to do

- Write clean, readable Python using variables, strings, numbers, decisions, loops, lists, dictionaries, functions, and exceptions

- Handle money correctly with `Decimal`, and work safely with dates, times, and time zones

- Read and write CSV, JSON, and Excel files, and organize folders automatically

- Model data with classes, dataclasses, enums, and type hints

- Set up virtual environments and professional project structures

- Test your code with pytest, debug methodically, and log what your programs do

- Use Git and GitHub, open pull requests, and run tests automatically with GitHub Actions

- Automate office tasks: reports, archives, and emails with attachments

- Call web APIs with `requests`, and build your own API with FastAPI

- Analyze data with pandas and store it in SQLite with SQL

- Build command-line tools, schedule jobs, and ship scripts that run without you

- Build a portfolio, prepare for technical interviews, and plan your first 90 days in a Python job

### Who this book is for

- **Complete beginners** who want to learn Python with a clear, practical goal

- **Office professionals, analysts, and operations staff** who want to automate repetitive work

- **Career changers** aiming for a first role in data, automation, or back-end development

- **Students and self-taught programmers** who know some syntax but not how professionals actually work

All code is written for Python 3.12 and works with Python 3.10 or later, on Windows, macOS, and Linux. The code examples were run and their output checked against the book.

Welcome to the team. Let's get to work.

Share this book

Author

About the Author

Oscar Gomez

Hi, I’m Oscar Gomez. I write practical programming books for people who want to use code to get real work done. I believe beginners learn fastest by solving real problems, not by memorizing syntax, so my books are built around workplace scenarios, hands-on projects, and the habits professionals use every day.

My goal is simple: to help you go from your first line of code to confident, job-ready skills. Thanks for reading, and welcome aboard.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub