# PythonAppResource

- Module: [Aspire.Hosting.Python](/reference/api/go/aspire.hosting.python.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

## Definition

```go
type PythonAppResource interface {
    IComputeResource
    IContainerFilesDestinationResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `IComputeResource`
- `IContainerFilesDestinationResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Methods

- [WithDebugging](/reference/api/go/aspire.hosting.python/pythonappresource/withdebugging.md) -- `method` -- Enables debugging support for the Python application.
  ```go
  WithDebugging() PythonAppResource
  ```
- [WithEntrypoint](/reference/api/go/aspire.hosting.python/pythonappresource/withentrypoint.md) -- `method` -- Configures the entrypoint for the Python application.
  ```go
  WithEntrypoint(entrypointType EntrypointType, entrypoint string) PythonAppResource
  ```
- [WithPip](/reference/api/go/aspire.hosting.python/pythonappresource/withpip.md) -- `method` -- Configures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
  ```go
  WithPip(options ...*WithPipOptions) PythonAppResource
  ```
- [WithUv](/reference/api/go/aspire.hosting.python/pythonappresource/withuv.md) -- `method` -- Adds a UV environment setup task to ensure the virtual environment exists before running the Python application.
  ```go
  WithUv(options ...*WithUvOptions) PythonAppResource
  ```
- [WithVirtualEnvironment](/reference/api/go/aspire.hosting.python/pythonappresource/withvirtualenvironment.md) -- `method` -- Configures a custom virtual environment path for the Python application.
  ```go
  WithVirtualEnvironment(virtualEnvironmentPath string, options ...*WithVirtualEnvironmentOptions) PythonAppResource
  ```
