Skip to content
Docs Try Aspire

PythonAppResourceBuilderExtensions

Class static net10.0
📦 Aspire.Hosting.Python v13.1.2
Provides extension methods for adding Python applications to an Hosting.IDistributedApplicationBuilder.
namespace Aspire.Hosting;
public static class PythonAppResourceBuilderExtensions
{
// ...
}
AddPythonApp(IDistributedApplicationBuilder, string, string, string)extension
IResourceBuilder<PythonAppResource>
Adds a Python application to the application model.
AddPythonApp(IDistributedApplicationBuilder, string, string, string, string[])extensionobsolete
IResourceBuilder<PythonAppResource>
Adds a python application with a virtual environment to the application model.
AddPythonApp(IDistributedApplicationBuilder, string, string, string, string, string[])extensionobsolete
IResourceBuilder<PythonAppResource>
Adds a python application with a virtual environment to the application model.
AddPythonExecutable(IDistributedApplicationBuilder, string, string, string)extension
IResourceBuilder<PythonAppResource>
Adds a Python executable to the application model.
AddPythonModule(IDistributedApplicationBuilder, string, string, string)extension
IResourceBuilder<PythonAppResource>
Adds a Python module to the application model.
AddUvicornApp(IDistributedApplicationBuilder, string, string, string)extension
IResourceBuilder<UvicornAppResource>
Adds a Uvicorn-based Python application to the distributed application builder with HTTP endpoint configuration.
WithDebugging(IResourceBuilder<T>)extension
IResourceBuilder<T>
Enables debugging support for the Python application.
WithEntrypoint(IResourceBuilder<T>, EntrypointType, string)extension
IResourceBuilder<T>
Configures the entrypoint for the Python application.
WithPip(IResourceBuilder<T>, bool, string[]?)extension
IResourceBuilder<T>
Configures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
WithUv(IResourceBuilder<T>, bool, string[]?)extension
IResourceBuilder<T>
Adds a UV environment setup task to ensure the virtual environment exists before running the Python application.
WithVirtualEnvironment(IResourceBuilder<T>, string, bool)extension
IResourceBuilder<T>
Configures a custom virtual environment path for the Python application.
View all methods