Skip to content
DocsTry Aspire
DocsTry

Aspire.Hosting.Python

Official
📦 Aspire.Hosting.Pythonv13.4.0
9Functions
3Types

Types

Functions

methodaddPythonAppbuilder
Adds a Python application to the application model.
addPythonApp(name: string, appDirectory: string, scriptPath: string): PythonAppResource
methodaddPythonExecutablebuilder
Adds a Python executable to the application model.
addPythonExecutable(name: string, appDirectory: string, executableName: string): PythonAppResource
methodaddPythonModulebuilder
Adds a Python module to the application model.
addPythonModule(name: string, appDirectory: string, moduleName: string): PythonAppResource
methodaddUvicornAppbuilder
Adds a Uvicorn-based Python application to the distributed application builder with HTTP endpoint configuration.
addUvicornApp(name: string, appDirectory: string, app: string): UvicornAppResource
methodwithDebuggingbuilder
Enables debugging support for the Python application.
withDebugging(): PythonAppResource
methodwithEntrypointbuilder
Configures the entrypoint for the Python application.
withEntrypoint(entrypointType: EntrypointType, entrypoint: string): PythonAppResource
methodwithPipbuilder
Configures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
withPip(install?: boolean, installArgs?: string[]): PythonAppResource
methodwithUvbuilder
Adds a UV environment setup task to ensure the virtual environment exists before running the Python application.
withUv(install?: boolean, args?: string[]): PythonAppResource
methodwithVirtualEnvironmentbuilder
Configures a custom virtual environment path for the Python application.
withVirtualEnvironment(virtualEnvironmentPath: string, createIfNotExists?: boolean): PythonAppResource

Enums