15 Python Projects: From Beginner Games to Full-Stack Apps
Fifteen Python projects with tutorials, from a five-minute Snake game to full-stack Django apps, plus ideas to make each one your own.
The fastest way to get good at Python is to build things with it. These 15 projects start with simple games you can finish in an evening and work up to full-stack web applications with a database and a front end. Most come with a free video tutorial; a few are project briefs you build yourself, which is the best practice of all.
The projects at a glance
| # | Project | Level | You’ll practice |
|---|---|---|---|
| 1 | Text-based adventure game | Beginner | Input, conditions, functions |
| 2 | Snake | Beginner | The curses library, game loops |
| 3 | Hangman | Beginner | Strings, lists, loops |
| 4 | Tic-tac-toe | Beginner | Data structures, game logic |
| 5 | Weather dashboard | Beginner | Calling a web API, JSON |
| 6 | Price tracker | Intermediate | Web scraping, email, scheduling |
| 7 | Discord bot | Intermediate | Async code, events, APIs |
| 8 | Spotify automation | Intermediate | OAuth, two APIs together |
| 9 | Face recognition | Intermediate | Computer vision libraries |
| 10 | Space Invaders | Intermediate | Pygame, sprites, collisions |
| 11 | Grocery store app | Full stack | Flask, MySQL, HTML and JavaScript |
| 12 | Blog | Full stack | Django, users, a database |
| 13 | Music controller | Full stack | Django REST API, React |
| 14 | E-commerce store | Full stack | Django, carts, checkout |
| 15 | Social media app | Full stack | Django, JavaScript, React |
Before you start
Install the latest Python 3 from python.org and a code editor such as VS Code or PyCharm. Learn to create a virtual environment (python -m venv .venv) and install packages with pip; nearly every project below needs at least one. Older tutorials sometimes pin old package versions, so if an install fails, try the current version of the package. Questions about setup? See our Python FAQ.
Beginner projects
1. Text-based adventure game
Build a story-driven game that runs in the terminal: the player reads a scene, chooses what to do, and the story branches. It uses nothing beyond the basics, so it’s the best first project on this list. The tutorial builds “Time Unraveled”, a time-travel adventure, in about 46 minutes and 375 lines of code.
From experience: this is the best Python project for beginners. I love adventure games and a good storyline, which is exactly what this game offers. You won’t get beautiful visuals from it, though.
Tim Statler, founder
Tutorial: Comp Sci Central, 46 minutes.
Level it up: move the story into a JSON file so you can add scenes without touching the code. There’s a Java version of this project in our Java projects for beginners.
2. Snake
The classic arcade game in about 50 lines of code. It uses Python’s built-in curses library to draw in the terminal, so there’s nothing to install on Mac or Linux. On Windows, run pip install windows-curses first. You’ll learn the core of every game: a loop that reads input, updates the game state and redraws the screen.
Tutorial: Comp Sci Central, 4 minutes. It goes from an empty file to a working game, one step at a time.
Full code: save it as snake.py and run python snake.py in a terminal at least 40 columns wide. Steer with the arrow keys and eat the *.
import curses
import random
HEIGHT, WIDTH = 16, 40
def main(screen):
curses.curs_set(0)
win = curses.newwin(HEIGHT, WIDTH, 0, 0)
win.keypad(True)
win.timeout(150)
snake = [(8, 12), (8, 11), (8, 10)]
dy, dx = 0, 1
food = (8, 20)
score = 0
turns = {
curses.KEY_UP: (-1, 0),
curses.KEY_DOWN: (1, 0),
curses.KEY_LEFT: (0, -1),
curses.KEY_RIGHT: (0, 1),
}
while True:
win.erase()
win.border()
win.addstr(0, 2, f" Score: {score} ")
win.addch(food[0], food[1], "*")
for y, x in snake:
win.addch(y, x, "#")
key = win.getch()
if key in turns:
new_dy, new_dx = turns[key]
if (new_dy, new_dx) != (-dy, -dx): # no reversing into yourself
dy, dx = new_dy, new_dx
head = (snake[0][0] + dy, snake[0][1] + dx)
hit_wall = head[0] in (0, HEIGHT - 1) or head[1] in (0, WIDTH - 1)
if hit_wall or head in snake:
break
snake.insert(0, head)
if head == food:
score += 1
while food in snake:
food = (random.randint(1, HEIGHT - 2), random.randint(1, WIDTH - 2))
else:
snake.pop()
return score
score = curses.wrapper(main)
print(f"Game over! Score: {score}")
How it works: the snake is a list of (row, column) pairs with the head first. Each turn, a new head is added in the current direction. If the head lands on the food, the score goes up and the tail stays, so the snake grows. Otherwise the tail is removed and the snake just moves. win.timeout(150) makes getch() wait at most 150 milliseconds for a key, which sets the game’s speed.
Level it up: save a high score to a file, and lower the timeout as the snake grows so the game speeds up. Want another take? Engineer Man’s 6-minute version builds it a little differently.
3. Hangman
Pick a random word, take guesses one letter at a time, and draw the hangman as wrong guesses pile up. Great practice with strings, lists and loops.
Tutorial: Comp Sci Central, 5 minutes. It builds the game step by step, from an empty file to the finished code below.
Full code: save it as hangman.py and run python hangman.py.
import random
WORDS = ["python", "laptop", "binary", "kernel", "syntax", "module"]
PARTS = ["O", "|", "/", "\\", "/", "\\"]
def draw(misses):
p = [PARTS[i] if i < misses else " " for i in range(6)]
print(" +---+")
print(" | " + p[0])
print(" | " + p[2] + p[1] + p[3])
print(" | " + p[4] + " " + p[5])
print("=======")
word = random.choice(WORDS)
guessed = set()
lives = 6
while lives > 0:
draw(6 - lives)
board = " ".join(c if c in guessed else "_" for c in word)
print(board, " lives:", lives)
if "_" not in board:
print("You win!")
break
guess = input("Guess a letter: ").lower()
if len(guess) != 1 or not guess.isalpha():
print("Please type one letter.")
continue
if guess in guessed:
print("You already tried that one.")
continue
guessed.add(guess)
if guess not in word:
lives -= 1
print("Nope!")
else:
draw(6)
print("Game over! The word was", word)
Level it up: load words from a file by difficulty and add a two-player mode where one player enters the word.
4. Tic-tac-toe
Two players take turns on a 3×3 grid, and the program checks for a winner after every move. It finishes in a day even if you’re new, and it’s a good lesson in representing a game’s state with data structures.
Tutorial: Clever Programmer, 1 hour 5 minutes.
Level it up: write a computer opponent. A version that never loses, using the minimax algorithm, is a great introduction to game AI.
5. Weather dashboard (project brief)
Build a program that shows the current weather and a seven-day forecast for any city. It’s the simplest way to learn how programs talk to web APIs, a skill nearly every real project needs.
- Use the free Open-Meteo API, which needs no API key for personal projects. Its geocoding endpoint turns a city name into latitude and longitude.
- Request the forecast with the
requestslibrary and parse the JSON response. - Print a tidy forecast table in the terminal.
- Handle errors: a misspelled city, no internet connection, a slow response.
Level it up: turn it into a small web page with Flask, or draw a temperature chart with Matplotlib.
Intermediate projects
6. Price tracker (project brief)
Track a product’s price and get an email when it drops below a target. Many big retailers, including Amazon, prohibit scraping in their terms and block scrapers, so practice on books.toscrape.com, a fake bookstore built for learning web scraping.
- Download a book’s page with
requestsand pull out the title and price with BeautifulSoup. - Save each price with a timestamp to a CSV file or SQLite database.
- Compare against your target price, and send yourself an email with Python’s built-in
smtplibwhen it’s reached. - Run it on a schedule with cron on macOS and Linux, or Task Scheduler on Windows.
Level it up: track many books from a list and plot each one’s price history.
7. Discord bot (project brief)
Build a bot for your own Discord server that answers commands, such as rolling dice, posting a random programming tip, or reminding the channel about a deadline.
- Create an application and bot in the Discord Developer Portal, invite it to a test server, and keep its token secret, out of your code and out of GitHub.
- Install the
discord.pylibrary and follow its quickstart. Discord now requires bots to enable the “message content” intent before they can read messages, which is why many older tutorials no longer work as written. - Add slash commands for each feature.
Level it up: store data per server in SQLite, such as a to-do list or a study-streak counter, and host the bot so it stays online.
8. Spotify automation
Add the songs you’ve liked on YouTube to a Spotify playlist automatically. What makes this tutorial worth watching is how it breaks one fuzzy goal into five small problems, each solved with an API call. That’s how real projects get planned.
Tutorial: Bukola, 10 minutes. The tutorial uses youtube-dl, which is no longer maintained; use yt-dlp, its actively maintained fork, instead. The Spotify side is easiest with the spotipy library.
Level it up: sort new songs into playlists by genre or mood using Spotify’s track data.
9. Face recognition
Detect and label faces in photos using the face_recognition library. You don’t need to understand machine learning to build it, which makes it a satisfying first look at computer vision. Installing the library’s dlib dependency can be fiddly on Windows; follow the library’s install notes closely.
Tutorial: Tech With Tim, 9 minutes.
From experience: Tech With Tim is one of my favorite YouTube channels, and this isn’t the only project of his on this list.
Tim Statler, founder
Level it up: run it live on your webcam with OpenCV.
10. Space Invaders
Defend against waves of alien ships in a full arcade game built with Pygame: sprites, movement, shooting, collisions, lives and levels. It’s long, about two hours, but you end with a real game.
Tutorial: Tech With Tim, 1 hour 56 minutes.
Level it up: add power-ups, a boss level and sound effects.
Full-stack projects
These five build complete web applications, with a back end in Python, a database and a front end. They’re multi-part series, so plan for several sessions each. A finished full-stack project is one of the strongest things you can put on an internship resume.
11. Grocery store management app
A store-management web app with a Python and Flask back end, a MySQL database, and an HTML and JavaScript front end for managing products and orders.
Tutorial: codebasics, multi-part series. Source code on GitHub.
12. Blog with Django
A full-featured blog with user registration, login, profiles, posts and pagination. Corey Schafer’s Django series is one of the clearest introductions to Django there is.
Tutorial: Corey Schafer, multi-part series. Source code on GitHub.
13. Music controller with Django and React
A web app that lets a group of people control music playback together, with a Django REST API on the back end and React on the front end, connected to Spotify.
Tutorial: Tech With Tim, multi-part series. Source code on GitHub.
14. E-commerce store
An online store with a product catalog, shopping cart and checkout, built with Django.
Tutorial: Dennis Ivy, multi-part series. Source code on GitHub.
15. Social media app
A Twitter-style app with posts, likes and user profiles, built with Django, JavaScript and React. It’s a single tutorial of more than 12 hours, so treat it as a short course.
Tutorial: CodingEntrepreneurs, 12 hours 40 minutes.
Make a project portfolio-ready
A copied tutorial won’t impress a recruiter. What you add after the video ends will:
- Add a feature the tutorial didn’t have.
- Deploy it so anyone can try it with a link, not just a screenshot.
- Put the code on GitHub with a README covering what it does, how to run it and what you’d improve.
- Write a few tests with
pytest.
Want more? Try our Java projects and WordPress projects, or see how Python compares to other languages in programming language levels.


