# Aspire.Hosting.Python

- Module: `Aspire.Hosting.Python`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `9`
- Types: `3`

## Handles

- [PythonAppResource](/reference/api/go/aspire.hosting.python/pythonappresource.md) -- `handle` - 5 members
- [UvicornAppResource](/reference/api/go/aspire.hosting.python/uvicornappresource.md) -- `handle` - 0 members

## Enums

- [EntrypointType](/reference/api/go/aspire.hosting.python/entrypointtype.md) -- `enum` - 3 values -- Specifies the type of entrypoint for a Python application.

## Functions

- [AddPythonApp](/reference/api/go/aspire.hosting.python/addpythonapp.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Python application to the application model.
- [AddPythonExecutable](/reference/api/go/aspire.hosting.python/addpythonexecutable.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Python executable to the application model.
- [AddPythonModule](/reference/api/go/aspire.hosting.python/addpythonmodule.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Python module to the application model.
- [AddUvicornApp](/reference/api/go/aspire.hosting.python/adduvicornapp.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Uvicorn-based Python application to the distributed application builder with HTTP endpoint configuration.
- [WithDebugging](/reference/api/go/aspire.hosting.python/withdebugging.md) -- `method` - on `PythonAppResource` -- Enables debugging support for the Python application.
- [WithEntrypoint](/reference/api/go/aspire.hosting.python/withentrypoint.md) -- `method` - on `PythonAppResource` -- Configures the entrypoint for the Python application.
- [WithPip](/reference/api/go/aspire.hosting.python/withpip.md) -- `method` - on `PythonAppResource` -- Configures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
- [WithUv](/reference/api/go/aspire.hosting.python/withuv.md) -- `method` - on `PythonAppResource` -- Adds a UV environment setup task to ensure the virtual environment exists before running the Python application.
- [WithVirtualEnvironment](/reference/api/go/aspire.hosting.python/withvirtualenvironment.md) -- `method` - on `PythonAppResource` -- Configures a custom virtual environment path for the Python application.
