Skip to content

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Nov 3, 2025

This makes the template apphost.cs a little easier to read. It also follows some standard conventions for file naming.

@eerhardt eerhardt requested review from Copilot and davidfowl November 3, 2025 16:47
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12628

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12628"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Python starter template to align the application structure with standard FastAPI conventions. The main change renames the Python application module from app.py to main.py and updates the Uvicorn app reference accordingly.

Key changes:

  • Updated the Uvicorn ASGI import path from "app:app" to "main:app" in apphost.cs
  • Added a new main.py file containing the complete FastAPI application with weather forecast API, health check endpoint, Redis caching support (conditional), OpenTelemetry instrumentation, and static file serving

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
apphost.cs Updated the AddUvicornApp call to reference "main:app" instead of "app:app" to match the new module naming
app/main.py New FastAPI application module with complete implementation including weather forecast API, optional Redis caching, health checks, and telemetry integration

@davidfowl davidfowl merged commit 02e9c0b into dotnet:main Nov 3, 2025
303 of 304 checks passed
@davidfowl
Copy link
Member

/backport to release/13.0

@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19044636479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants