Aspire.Hosting.Python
Official
📦 Aspire.Hosting.Pythonv13.4.09Functions
3Types
3 types and 0 members
Types
Functions
method
addPythonAppbuilderAdds a Python application to the application model.
addPythonApp(name: string, appDirectory: string, scriptPath: string): PythonAppResourcemethod
addPythonExecutablebuilderAdds a Python executable to the application model.
addPythonExecutable(name: string, appDirectory: string, executableName: string): PythonAppResourcemethod
addPythonModulebuilderAdds a Python module to the application model.
addPythonModule(name: string, appDirectory: string, moduleName: string): PythonAppResourcemethod
addUvicornAppbuilderAdds a Uvicorn-based Python application to the distributed application builder with HTTP endpoint configuration.
addUvicornApp(name: string, appDirectory: string, app: string): UvicornAppResourcemethod
withDebuggingbuilderEnables debugging support for the Python application.
withDebugging(): PythonAppResourcemethod
withEntrypointbuilderConfigures the entrypoint for the Python application.
withEntrypoint(entrypointType: EntrypointType, entrypoint: string): PythonAppResourcemethod
withPipbuilderConfigures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
withPip(install?: boolean, installArgs?: string[]): PythonAppResourcemethod
withUvbuilderAdds a UV environment setup task to ensure the virtual environment exists before running the Python application.
withUv(install?: boolean, args?: string[]): PythonAppResourcemethod
withVirtualEnvironmentbuilderConfigures a custom virtual environment path for the Python application.
withVirtualEnvironment(virtualEnvironmentPath: string, createIfNotExists?: boolean): PythonAppResource