explaingit

miguelgrinberg/flasky

8,760PythonAudience · developerComplexity · 2/5Setup · moderate

TLDR

Flasky is the companion source code for the O'Reilly Flask Web Development book, each Git commit maps to a specific chapter so readers can check out working code at any point in the book.

Mindmap

mindmap
  root((Flasky))
    What it is
      Book companion code
      Flask Web Development
      OReilly second edition
    Code structure
      Commits per chapter
      Git tags per section
    Topics covered
      Flask routing
      SQLAlchemy models
      User authentication
    How to use
      Follow book chapters
      Reference implementation
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Check out a specific commit to see the complete working code at any chapter of the Flask Web Development book.

USE CASE 2

Compare Git commits to understand exactly what code changes the book introduces between sections.

USE CASE 3

Use the completed app as a reference for a Flask project with authentication, forms, and database models.

Tech stack

PythonFlask

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the O'Reilly Flask Web Development book to understand the commit structure, setup instructions are in the book's preface rather than the README.

No explicit license is stated, the code is tied to an O'Reilly book and rights are likely reserved to the author.

In plain English

Flasky is the companion code repository for the O'Reilly book "Flask Web Development", second edition, written by Miguel Grinberg. If you are reading that book, this repository contains all the Python source code examples that the book walks you through. The repository is structured to follow the book closely. Each commit and each Git tag corresponds to a specific point in the book, so you can check out a particular commit to see the state of the project as it exists at any given chapter or section. The book's preface contains a dedicated section explaining how to work through the example code alongside the reading, and the README directs readers there for instructions. Because the commits map to the book's progression, looking at the raw code without the book as context may be confusing. The repository is not designed as a standalone project to download and run, it is a reference for people following along with the text. The first edition of the book had its own code repository, which has since been moved to a separate location. This repository contains only the second edition examples. The README is intentionally brief, with no setup instructions or feature descriptions, since those details live in the book itself. The repository is tagged with Python and Flask as its topics, matching the subject of the book. The README is intentionally minimal: two short paragraphs with no setup instructions, no feature list, and no screenshots. All of that detail is in the book. If you come across this repository without having the book, there is very little here to work from independently.

Copy-paste prompts

Prompt 1
I'm following the Flask Web Development book's chapter on user authentication. Show me how to implement a login form with Flask-Login, password hashing with Werkzeug, and a protected route.
Prompt 2
Using Flask and SQLAlchemy, show me how to define a User model with a one-to-many relationship to Posts, and query all posts by a specific user.
Prompt 3
How do I add email confirmation to a Flask registration flow using itsdangerous for signed tokens and Flask-Mail to send the message?
Prompt 4
How do I structure a Flask app with the application factory pattern and Blueprints for separate authentication and main sections, as in the Flask Web Development book?
Prompt 5
Write a Flask-WTF form class for a blog post with a title, body text area, and category dropdown, including CSRF protection.
Open on GitHub → Explain another repo

← miguelgrinberg on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.