Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test-redistribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.10"
# Needed to run tests
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.6"
enable-cache: true
- name: Verify uv is available
run: uv --version
- name: Install build dependencies
run: pip install build
- name: Build source distribution
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
version: "0.9.6"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
version: "0.9.6"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
Expand Down
114 changes: 107 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,114 @@
# Python-generated files
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[oc]
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# Virtual environments
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm-project.org/#use-with-ide
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Coverage
htmlcov
.coverage*
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
19 changes: 18 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,24 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = []
dependencies = [
"typer>=0.12.0",
"rich>=13.0.0",
"typing-extensions>=4.8.0",
"rich-toolkit>=0.15.1",
]

[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"coverage[toml]>=7.0.0",
"mypy>=1.8.0",
"ruff>=0.3.0",
]

[project.scripts]
fastapi-new = "fastapi_new.cli:main"

[project.urls]
Homepage = "https://github.com/fastapi/fastapi-new"
Documentation = "https://github.com/fastapi/fastapi-new"
Expand Down
3 changes: 3 additions & 0 deletions src/fastapi_new/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .cli import main

main()
11 changes: 11 additions & 0 deletions src/fastapi_new/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import typer

from fastapi_new.new import new as new_command

app = typer.Typer(rich_markup_mode="rich")

app.command()(new_command)


def main() -> None:
app()
Empty file removed src/fastapi_new/main.py
Empty file.
Loading