-
Notifications
You must be signed in to change notification settings - Fork 168
Add Python templates and onboarding documentation #5304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
12
commits into
release-13
Choose a base branch
from
copilot/address-issue-5151
base: release-13
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+336
−23
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7619157
Initial plan
Copilot 2e8bfba
Add Python template and onboarding documentation
Copilot b79c5b3
Fix Python version requirement consistency
Copilot 70d2439
Update Python template docs to use Aspire CLI and correct template st…
Copilot d35361e
Remove duplicate File-based AppHost section
Copilot 718554a
Apply all suggestions from @alistairmatthews review
Copilot 32143c8
Change .NET CLI commands to Aspire CLI in build-aspire-apps-with-pyth…
Copilot 362b7c2
Replace CLI commands with interactive Aspire CLI steps
Copilot ea3142e
Integrated feedback from @davidfowl.
alistairmatthews 8f9dd7f
Added an aspire run screenshot and updated another.
alistairmatthews e7dd915
A couple of small corrections.
alistairmatthews 75a6d9c
Update docs/get-started/build-aspire-python-app.md
alistairmatthews File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,17 @@ The following Aspire solution templates are available, assume the solution is na | |
| - **AspireSample.Web**: An [ASP.NET Core Blazor App](/aspnet/core/blazor) project with default Aspire service configurations, this project depends on the [**AspireSample.ServiceDefaults**](#service-defaults) project. | ||
| - **AspireSample.Test**: Either an [MSTest](#mstest-project), [NUnit](#nunit-project), or [xUnit](#xunit-project) test project with project references to the [**AspireSample.AppHost**](#app-host) and an example _WebTests.cs_ file demonstrating an integration test. | ||
|
|
||
| <a name="python-app"></a> | ||
|
|
||
| - **Aspire Python App**: A full-stack Aspire application with a Python backend and a JavaScript frontend. This template uses a file-based AppHost and includes: | ||
|
|
||
| - **apphost.cs**: A file-based AppHost that orchestrates the Python backend and the JavaScript frontend. It also includes a Redis cache in the solution. | ||
| - **app**: A Python backend that uses the [FastAPI](https://fastapi.tiangolo.com/) framework with OpenTelemetry instrumentation. | ||
| - **frontend**: A JavaScript frontend using the [React](https://react.dev/) framework with [Vite](https://vite.dev). | ||
|
|
||
| > [!NOTE] | ||
| > You can't yet use the Aspire Python App template in Visual Studio. | ||
|
|
||
| ### Project templates | ||
|
|
||
| The following Aspire project templates are available: | ||
|
|
@@ -96,18 +107,27 @@ To create an Aspire solution or project using the .NET CLI, use the [dotnet new] | |
|
|
||
| To create a basic [Aspire AppHost](app-host-overview.md) project targeting the latest .NET version: | ||
|
|
||
| ```dotnetcli | ||
| dotnet new aspire-apphost | ||
| ```Aspire | ||
| aspire new aspire-apphost | ||
| ``` | ||
|
|
||
| To create an Aspire starter app, which is a full solution with a sample UI and backing API included: | ||
|
|
||
| ```dotnetcli | ||
| dotnet new aspire-starter | ||
| ```Aspire | ||
| aspire new aspire-starter | ||
| ``` | ||
|
|
||
| To create an Aspire app with a Python backend and JavaScript frontend: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be using aspire new not dotnet new
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know, I have it going to work... see #5304 (review) |
||
|
|
||
| ```Aspire | ||
| aspire new aspire-py-starter | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `aspire-py-starter` template is currently under development. For more information, see [Build an Aspire app with Python and JavaScript](../get-started/build-aspire-python-app.md). | ||
|
|
||
| > [!TIP] | ||
| > Aspire templates default to using the latest .NET version, even when using an earlier version of the .NET CLI. To manually specify the .NET version, use the `--framework <tfm>` option, e.g. to create a basic [Aspire AppHost](app-host-overview.md) project targeting .NET 8: | ||
| > Aspire templates default to using the latest .NET version. To manually specify the .NET version, use the .NET CLI with the `--framework <tfm>` option, for example to create a basic [Aspire AppHost](app-host-overview.md) project targeting .NET 8: | ||
| > | ||
| > ```dotnetcli | ||
| > dotnet new aspire-apphost --framework net8.0 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.