Skip to content

Commit fda0dec

Browse files
♻️ Address PR comments from tiangolo
1 parent 43f7416 commit fda0dec

File tree

4 files changed

+286
-364
lines changed

4 files changed

+286
-364
lines changed

.gitignore

Lines changed: 12 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,32 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Python
22
__pycache__/
33
*.py[cod]
44
*$py.class
5-
6-
# C extensions
75
*.so
86

97
# Distribution / packaging
10-
.Python
118
build/
12-
develop-eggs/
139
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
2410
*.egg-info/
25-
.installed.cfg
2611
*.egg
27-
MANIFEST
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
3812

39-
# Unit test / coverage reports
13+
# Testing / coverage
4014
htmlcov/
41-
.tox/
42-
.nox/
4315
.coverage
4416
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
*.py,cover
50-
.hypothesis/
17+
coverage/
5118
.pytest_cache/
52-
cover/
53-
54-
# pyenv
55-
# For a library or package, you might want to ignore these files since the code is
56-
# intended to run in multiple environments; otherwise, check them in:
57-
# .python-version
58-
59-
# pipenv
60-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
61-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
62-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
63-
# install all needed dependencies.
64-
#Pipfile.lock
6519

66-
# poetry
67-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
68-
# This is especially recommended for binary packages to ensure reproducibility, and is more
69-
# commonly ignored for libraries.
70-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
71-
#poetry.lock
72-
73-
# pdm
74-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
75-
#pdm.lock
76-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
77-
# in version control.
78-
# https://pdm-project.org/#use-with-ide
79-
.pdm.toml
80-
.pdm-python
81-
.pdm-build/
82-
83-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
84-
__pypackages__/
85-
86-
# Environments
87-
.env
88-
.venv
89-
env/
90-
venv/
91-
ENV/
92-
env.bak/
93-
venv.bak/
94-
95-
# mypy
20+
# Type checking
9621
.mypy_cache/
97-
.dmypy.json
98-
dmypy.json
99-
100-
# Pyre type checker
101-
.pyre/
10222

103-
# pytype static type analyzer
104-
.pytype/
23+
# Virtual environment (uv)
24+
.venv/
10525

106-
# Cython debug symbols
107-
cython_debug/
26+
# IDE
27+
.vscode/
28+
.idea/
10829

109-
# PyCharm
110-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
111-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
112-
# and can be added to the global gitignore or merged into this file. For a more nuclear
113-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
114-
#.idea/
30+
# OS
31+
.DS_Store
32+
Thumbs.db

src/fastapi_new/new.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _generate_readme(project_name: str) -> str:
4040
4141
Visit http://localhost:8000
4242
43-
### Deploy to FastAPI CLI:
43+
### Deploy to FastAPI Cloud:
4444
4545
> Reader's note: These commands are not quite ready for prime time yet, but will be soon! Join the waiting list at https://fastapicloud.com!
4646
@@ -68,8 +68,8 @@ def _exit_with_error(toolkit: RichToolkit, error_msg: str) -> None:
6868

6969
def _validate_python_version(python: str | None) -> str | None:
7070
"""
71-
Validate Python version is >= 3.8.
72-
Returns error message if < 3.8, None otherwise.
71+
Validate Python version is >= 3.10.
72+
Returns error message if < 3.10, None otherwise.
7373
Let uv handle malformed versions or versions it can't find.
7474
"""
7575
if not python:
@@ -81,8 +81,8 @@ def _validate_python_version(python: str | None) -> str | None:
8181
return None # Let uv handle malformed version
8282
major, minor = int(parts[0]), int(parts[1])
8383

84-
if major < 3 or (major == 3 and minor < 8):
85-
return f"Python {python} is not supported. FastAPI requires Python 3.8 or higher."
84+
if major < 3 or (major == 3 and minor < 10):
85+
return f"Python {python} is not supported. FastAPI requires Python 3.10 or higher."
8686
except (ValueError, IndexError):
8787
# Malformed version - let uv handle the error
8888
pass
@@ -150,15 +150,15 @@ def new(
150150
project_name: Annotated[
151151
str | None,
152152
typer.Argument(
153-
help="The name of the new FastAPI Cloud project. If not provided, initializes in the current directory.",
153+
help="The name of the new FastAPI project. If not provided, initializes in the current directory.",
154154
),
155155
] = None,
156156
python: Annotated[
157157
str | None,
158158
typer.Option(
159159
"--python",
160160
"-p",
161-
help="Specify the Python version for the new project (e.g., 3.9). Must be 3.8 or higher.",
161+
help="Specify the Python version for the new project (e.g., 3.14). Must be 3.10 or higher.",
162162
),
163163
] = None,
164164
) -> None:

0 commit comments

Comments
 (0)