cursor-workshop/python-workshop at main · dotdc/cursor-workshop · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Snake Bookshop - Python Workshop

Welcome to the "Snake Bookshop", the Python variant of this Cursor workshop !

Quick start

Prerequisites

Make sure you have Python, Make, and Cursor installed on your computer.

Install Cursor:

Install Python and Make:

OS Installation command
Ubuntu sudo apt install -y python3 python3-venv python3-pip make
Fedora sudo dnf install -y python3 python3-pip make
Arch Linux sudo pacman -Sy python python-pip make
MacOS brew install python make

Run application

make

Important

Before starting the workshop, delete the other *-workshop/ folders (or add a Cursor rule that ignores them) so Cursor's LLM context stays focused on the Python version.

Workshop Quests

The Frenchy's typo

Users of the Books API don't understand what rarity refers to. In fact, our French developer accidentally misused rarity instead of rating. Please fix that in app/models.py using Cursor's tab autocompletion.

Need a hint?
Maybe replace it first in the Book class (line 15), then see if tab completion does the rest!

From Shakespeare to Molière

The .cursor/rules/pirate.mdc file forces Cursor to answer like a pirate. While you enjoy the Monkey Island vibe, you would prefer that Cursor respond in French to sharpen your French skills. Ask Cursor to update the rule so replies default to French unless SHAKESPEARE is present in the prompt, allowing your British colleague to bypass it.

Need a hint?
Use Cursor Agent mode to rewrite the rule so it responds in French, but do not forget the SHAKESPEARE bypass for your British colleague!

The Eternal Year Problem

The year in the footer is hardcoded to 2025 in app/templates/base.html. As 2026 is around the corner, and since we don't want to change it manually every year, see if Cursor can help display the current year automatically.

Need a hint?
You could either Ask it directly, or call an Agent!

The Missing Search Feature

The search feature on the Books page was never developed by our lazy French developer.
Can you add it?

Need a hint?
Copy paste the instruction to your Cursor Agent!

The Caffeinated Artist

Your coffee addiction and artistic soul are telling you that one of the buttons deserves a better color. Take a screenshot of one of the buttons, then ask Cursor to change its color to the legendary Starbucks Green (#00704A). The other buttons should keep their original color.

Need a hint?
You need an artistic Agent for this one!

The Hidden Easter Egg

We suspect the original developer hid an easter egg in the Snake Bookshop instead of working on the search feature. See if Cursor can help you uncover it!

Need a hint?
Just Ask...

Trekkie Health Check

The function get_health_status() in app/services.py currently returns a hardcoded OK. Since our customers are Star Trek fans, we need to follow their Trekkie odd-even rule, they've requested that the status should be GOOD when the request happens on an "even" second, and BAD when on an "odd" second.

Need a hint?
Good luck with these weirdos!

The Rust Rewrite

You've finally realized that Python is slow and decided to rewrite the whole thing in Rust! See if Cursor can help you!

Need a hint?
Maybe it's the good time to enable Max mode!

The Forgotten TDD Course

It seems the original developer completely missed the Test-Driven Development course, there are no tests at all! Use Cursor to add proper tests for this application so we can finally trust it.

Need a hint?
Maybe Ask Cursor to generate a few, then refine them with an Agent!

The Documentalist

You've successfully made the Snake Bookshop production-ready with your godlike developer skills (and maybe with Cursor's help!). But since you're a nice person who doesn't want the next developer to eat their hat in despair, you've decided to use Cursor to create a MAINTAINERS_GUIDE.md explaining the ins and outs of this software masterpiece!

Need a hint?
Gods don't need any hints!

Hope you will learn something new and have fun during this Cursor workshop! 🎉

Credits