
Join our Industry Projects for Python course and get prepared for internships and interviews!
update code samples on learning platform to use flet 0.80 using uv sync –upgrade
Download code and unzip
- In the Industry Python course, Chapter 9 - https://industry-python.thinkific.com/courses/take/industry-projects-with-python/downloads/71672923-download-code-for-chapter-9
Open with Cursor
- main.py
- pyproject.toml
Use uv to sync and run the code
- README as setup and run instructions
update version of app in pyproject.toml using uv version or manually update
Use uv to upgrade flet
- Look at header info in pyproject.toml (“before”)
- Edit pyproject.toml header
dependencies = [
"flet[all]~=0.80",
]In pyproject.toml, the ~= operator is the compatible release specifier (PEP 440). It means:
- Minimum version:
0.80(inclusive)
- Allowed updates: newer releases that keep the same “major.minor” (
0.80.x,0.81.x, …)
- Upper bound:
< 0.81
uv sync --upgradeuv sync --upgrade will try to update the locked (resolved) versions in uv.lock to newer releases, then sync your environment to match.
What it upgrades is bounded by your constraints:
- Your
pyproject.tomlspecifiers (e.g.,flet[all]~=0.80means it can only go up to<0.81)
Edit description and add link to course
uv version --bump patch
- This will increment the version number, which helps us keep track of upgraded code
- major: Increase the major version (e.g., 1.2.3 => 2.0.0)
- minor: Increase the minor version (e.g., 1.2.3 => 1.3.0)
- patch: Increase the patch version (e.g., 1.2.3 => 1.2.4)
- major: Increase the major version (e.g., 1.2.3 => 2.0.0)
- You can edit pyproject.toml manually, too
Before
[project]
name = "dec-vs-imp"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"flet[all]>=0.70.0.dev0",
]After
[project]
name = "dropdown-snack"
version = "0.1.1"
description = "Chapter 9 code for the Flet dropdown and snackbar tutorial. Link to course: https://industry-python.thinkific.com/products/courses/industry-projects-with-python"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"flet[all]~=0.80",
]Join our Industry Projects for Python course and get prepared for internships and interviews!