Aspire.Hosting.Python
Official
📦 Aspire.Hosting.Pythonv17.0.0Import path
apphost/modules/aspire9Functions
3Types
3 types, 9 functions and 0 members
Handles
Enums
Functions
DistributedApplicationBuilder
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) UvicornAppResourcePythonAppResource
method
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(options ...*WithPipOptions) PythonAppResourcemethod
WithUvbuilderAdds a UV environment setup task to ensure the virtual environment exists before running the Python application.
WithUv(options ...*WithUvOptions) PythonAppResourcemethod
WithVirtualEnvironmentbuilderConfigures a custom virtual environment path for the Python application.
WithVirtualEnvironment(virtualEnvironmentPath string, options ...*WithVirtualEnvironmentOptions) PythonAppResource