The best Python projects with source code are small, runnable and licensed for reuse: Real Python's tutorial projects, 270 beginner projects in one repository, GUI and game examples, the official Flask Flaskr app and algorithm demos. Clone one, run it exactly as written, read how it is built, then change it: add tests, swap the database or add a feature. A project you extended is worth more than one you copied.
Each repository below was checked with the GitHub API on 4 November 2026 for its licence, its latest commit and whether it is archived. Star counts are a snapshot. Several repos are collections: pick one folder, not the whole thing. For ideas to build from scratch, see Python projects for beginners.
Collections and learning repositories
realpython/materials
Beginner to intermediatePython 3 (varies per folder: Django, Flask, pygame, arcade, turtle, asyncio, pandas)
WhatCompanion code for hundreds of Real Python tutorials, one folder per tutorial. Many folders are complete small projects: pygame and turtle games, a Django blog, web scrapers and command-line tools.
LearnHow small, finished Python projects are structured, and how a project grows step by step (the stepwise snapshots let you diff step N against step N+1).
Try thisFind the asteroids pygame folder (its name has a typo, so search the repo), finish the tutorial, then add a persistent high-score file and a second enemy type with its own sprite and speed.
Check firstMIT licence, about 5,200 stars, last push 2026-11-04. Folder quality and age vary. Each folder pairs with a Real Python article, and some articles sit behind a membership; the code itself is free to clone.
Python 3 (mostly standard library; some folders add pygame, tkinter, requests, pandas)
What270+ small, self-contained beginner Python projects (games, tools, scrapers, GUIs, ML notebooks) in projects/, each in its own folder with a README; a companion site (pybegin.pages.dev) runs 60+ of them in the browser via Pyodide.
LearnReading and running many tiny programs of increasing difficulty; how to package a one-file project with a README; the in-browser playground lets you edit code and see results instantly.
Try thisPick a text game (for example a quiz or number-guessing project), add a scoreboard saved to JSON, then write 5 pytest cases for its scoring function.
Check firstMIT licence, about 2,800 stars, last push 2026-06-03. Community-contributed, so quality and style vary. The GitHub About text still says 'Temporarily under update', but the README and commits are current.
geekcomputers/Python
BeginnerPython 3 (README badge says 3.10+), plus tkinter, pygame, requests and others depending on the script
WhatHundreds of single-file scripts and small projects (games, calculators, GUI apps, file utilities, algorithm snippets) collected from many contributors by Craig Richards.
LearnBreadth of what small Python programs look like: file handling, string tricks, simple games, scraping, GUI basics. Good for reading many short programs quickly.
Try thisChoose a script that has no input checking (for example the calculator or a converter), add validation, split it into functions and write unit tests; then turn it into a package with a __main__ entry point.
Check firstMIT licence, about 35,000 stars, last push 2026-10-16. Very uneven quality and a flat folder of hundreds of files, some old-style code; no tests or CI guarantees per script; the author describes them as personal experiments.
kyclark/tiny_python_projects
BeginnerPython 3, argparse, pytest, Makefile
WhatCode and tests for the Manning book 'Tiny Python Projects': 22 numbered command-line exercises (hello, crowsnest, picnic, howler, wc, mad libs, tic-tac-toe and more), each folder with a README, a pytest test.py and a solution.py.
LearnTest-driven learning: you write a program to satisfy a given test suite, and learn argparse CLIs, string/list handling and reading files.
Try thisWrite solutions without looking at solution.py, then add a new numbered exercise of your own (for example a Hindi-to-Hinglish word replacer) with its own test.py in the same style.
Check firstMIT licence, about 1,900 stars, last push 2024-07-22. A finished classic: the last commit was in March 2024. Kept because it is a complete, tested companion to a book.
trekhleb/learn-python
BeginnerPython 3, pytest, pylint/flake8
WhatA 'playground and cheatsheet' of runnable Python examples organised by topic in src/ (operators, data types, control flow, functions, classes, modules, errors, files, standard library), each with pytest assertions.
LearnLanguage fundamentals by editing code and watching assertions pass or fail; how to document Python with executable examples.
Try thisAdd a new topic folder (for example dataclasses or asyncio basics) following the same pattern: explanatory docstring, 5 or more assertions, and a README link.
Check firstMIT licence, about 18,000 stars, last push 2026-04-06. A tutorial or cheat sheet rather than a set of projects.
practical-tutorials/project-based-learning
Beginner to intermediateLanguage-agnostic list (README.md); the Python section links to external tutorials
WhatA curated list, not code: an index of external project-based tutorials grouped by language (Python, JavaScript, Java and others), such as 'build an X' articles and video courses.
LearnWhere to find a guided build for a chosen project idea; how to pick a project beyond a to-do app.
Try thisPick one Python tutorial from the list, build it, then extend it with tests, a README, CI and a deployment, and publish it as your own repo.
Check firstMIT licence, about 289,000 stars, last push 2026-11-02. A list of third-party links, so quality and age vary and some links will have rotted. A mix of videos, paid and free material.
Desktop apps, terminal apps and games
pythonguis/pythonguis-examples
Beginner to intermediatePython 3 with PyQt6/PySide6, Tkinter, Kivy, Flet, DearPyGui, NiceGUI, Streamlit (one folder per toolkit)
WhatHundreds of desktop and web-UI examples from pythonguis.com, from complete apps to reusable widgets, with folders for PyQt5/6, PySide2/6, Tkinter, Kivy, Flet, DearPyGui, NiceGUI and Streamlit.
LearnHow the same small app is built in different GUI toolkits, signals/slots and event loops, layouts, and packaging a desktop app.
Try thisTake a to-do or notes example, add SQLite persistence and a search box, then port the same app to a second toolkit (for example Tkinter to PySide6) and compare the code.
Check firstMIT licence, about 4,700 stars, last push 2026-03-19. Run from inside each example folder; dependencies differ per toolkit and PyQt has GPL/commercial licensing to consider if you ship an app (the repo's own code is MIT).
TomSchimansky/CustomTkinter
Beginner to intermediatePython 3, Tkinter, CustomTkinter
WhatA modern-looking UI toolkit built on Tkinter; the repo has the library source (customtkinter/), tests and an examples/ folder (simple, complex, image, scrollable-frame and background-image demos).
LearnBuilding a clean desktop GUI quickly, widget composition, appearance modes (light/dark), and reading a real widget library's source.
Try thisBuild an expense tracker: forms, a table view and a dark/light toggle persisted to a JSON settings file; then add CSV export and a monthly chart.
Check firstMIT licence, about 14,000 stars, last push 2026-06-24. A library repo, not a project collection: the learning value is the 5 example scripts plus the docs. 297 open issues. 44 commits in the last 12 months but none in the last 90 days (last 2026-06-24).
pythonarcade/arcade
Beginner to intermediatePython 3, arcade (OpenGL/pyglet-based)
WhatA Python 2D game library with a large arcade/examples folder of runnable programs (platformer, asteroids, mazes, A* pathfinding, Conway's life, minimap, lighting) plus a tutorial site.
LearnGame loops, sprites, collision, cameras, mazes and simple pathfinding in clean modern Python.
Try thisRun examples/camera_platform.py, then add enemies that chase the player using the A* pathfinding example, and load levels from a Tiled map file.
Check firstMIT licence, about 2,100 stars, last push 2026-10-30. Library repo with a lot of non-example code; needs a working OpenGL driver (older laptops may struggle). 38 open issues; very active (release 2026-08-07).
Textualize/textual
IntermediatePython 3 (asyncio), Textual, Rich, CSS-like .tcss styling
WhatA framework for building rich terminal UIs; the examples/ folder has ready apps (calculator, clock, code browser, dictionary lookup, five-by-five puzzle, JSON tree, markdown viewer) and the docs include a stopwatch tutorial.
LearnEvent-driven UI design, widgets and layouts, styling with CSS, async tasks, and testing a UI with Textual's pilot.
Try thisExtend examples/calculator.py with a history panel and keyboard shortcuts, then write pilot-based tests; or build a terminal to-do app with SQLite storage.
Check firstMIT licence, about 38,000 stars, last push 2026-10-09. Large library; understanding async helps. 257 open issues and 119 open PRs. Only 1 commit in the last 90 days though the last release was 2026-06-30.
plbrault/youre-the-os
IntermediatePython 3.14, pygame-ce, pipenv, pytest, pygbag (web build)
WhatA game where you play a computer's operating system, scheduling processes, memory and I/O before the user loses patience; has a desktop version, a browser build, a sandbox mode and an API for writing auto-playing scripts.
LearnGame architecture (scenes, UI objects, engine), operating-system scheduling ideas in practice, and shipping a Python game to the browser.
Try thisWrite an auto-player script with the automation API that beats the manual high score, or add a new sandbox stage with a custom process mix and test it.
Check firstGPL-3.0 licence, about 2,700 stars, last push 2026-11-04. GPL-3.0 (copyleft: derivative works must also be GPL). README warns the main branch can be unstable; check out a release tag. Pinned to Python 3.14 which many students will not have yet.
Web
pallets/flask
IntermediatePython 3, Flask, SQLite, Jinja2, pytest, Celery (celery example)
WhatThe official Flask repository; its examples/ folder holds three apps: tutorial (the Flaskr blog with auth, blueprints, SQLite and tests), javascript (Flask plus fetch/AJAX) and celery (background tasks).
LearnApplication factory, blueprints, sessions and login, database access and testing in an official, idiomatic Flask app.
Try thisAdd comments and likes to Flaskr, replace raw SQLite with SQLAlchemy and Alembic migrations, and raise test coverage; then move it to PostgreSQL.
Check firstBSD-3-Clause licence, about 75,000 stars, last push 2026-10-30. Most of the repo is framework source; only the examples/ folder is the learning target.
Algorithms and robotics
AtsushiSakai/PythonRobotics
IntermediatePython 3.13 (README), NumPy, Matplotlib, pytest
WhatPython sample code for robotics algorithms: localization, mapping, SLAM, path planning (A*, RRT and more), path tracking, arm navigation, with animated matplotlib demos, unit tests and a docs site.
LearnHow textbook algorithms become readable code, visualising algorithms with matplotlib, and how to test numerical code.
Try thisPick PathPlanning/AStar, add a diagonal-move cost option and a weighted heuristic, visualise both on the same grid and write a pytest comparing path lengths.
Check firstMIT licence, about 31,000 stars, last push 2026-11-04. Needs some maths (linear algebra, probability) for the filter and SLAM sections; start with path planning. 17 open issues, 62 open PRs, very active.
How to study a repository
- Read the README and run the project exactly as written before you change anything.
- Open the folder tree and write one sentence for what each folder does.
- Find the entry point and trace one feature from the screen or command to the data.
- Run the tests, then break something on purpose and watch a test fail.
- Make the change in the Try this line, commit it and write what you learned in your own README.
Licences in one minute
- MIT, BSD and Apache-2.0 let you reuse the code, including in a portfolio, if you keep the notice.
- GPL is copyleft: software you build from it must also be released under the GPL.
- CC0 is a public-domain dedication.
- A repository with no licence is all rights reserved, so link to it but do not copy it.
- Never commit API keys. Use test keys and environment variables.
Frequently asked questions
Where can I find Python projects with source code?
Start with the repositories above: Real Python's tutorial materials, the Python beginner projects collection, the official Flask examples and the PythonRobotics algorithms. Each was checked for licence and recent commits.
Can I use these projects in my portfolio?
Yes, if the licence allows it and you add your own work. Fork the repository, add tests, a feature or a deployment, and describe what you changed. Do not present unchanged code as your own.
Which Python project is best for a beginner?
Pick one folder from the beginner projects collection, or work through Tiny Python Projects. Then try the Flask Flaskr example when you want a web app.
Why not use sites that sell student projects?
Most have unclear licences and unchanged code that reviewers recognise. Open repositories with a clear licence are safer, and you can read the history.
How do I run a project from GitHub?
Clone it, create a virtual environment, install the requirements from the README and run the command it gives. If a step fails, read the error and the repository's issues.
Learn this with mentors
Programmes for builders and engineers with admissions open: live classes, mentors and project work.


