addUvicornApp

Method
📦 Aspire.Hosting.Python v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addUvicornApp(
name: string,
appDirectory: string,
app: string): UvicornAppResource;
}

Signature

methodaddUvicornAppbuilder
Adds a Uvicorn-based Python application to the distributed application builder with HTTP endpoint configuration.
addUvicornApp(
name: string,
appDirectory: string,
app: string): UvicornAppResource
namestringThe unique name of the Uvicorn application resource.
appDirectorystringThe directory containing the Python application files.
appstringThe ASGI app import path which informs Uvicorn which module and variable to load as your web application. For example, "main:app" means "main.py" file and variable named "app".
UvicornAppResource

Applies to

This method applies to the following types: