# PythonAppResource

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

## Definition

```typescript
interface PythonAppResource
  extends IComputeResource,
    IContainerFilesDestinationResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IResourceWithServiceDiscovery {
  withDebugging(): PythonAppResource;
  withEntrypoint(
      entrypointType: EntrypointType,
      entrypoint: string): PythonAppResource;
  withPip(
      install?: boolean,
      installArgs?: string[]): PythonAppResource;
  withUv(
      install?: boolean,
      args?: string[]): PythonAppResource;
  withVirtualEnvironment(
      virtualEnvironmentPath: string,
      createIfNotExists?: boolean): PythonAppResource;
}
```

## Methods

- [withDebugging](/reference/api/typescript/aspire.hosting.python/pythonappresource/withdebugging.md) -- `method` -- Enables debugging support for a Python application
    ```typescript
  withDebugging(): PythonAppResource
  ```
- [withEntrypoint](/reference/api/typescript/aspire.hosting.python/pythonappresource/withentrypoint.md) -- `method` -- Configures the entrypoint for a Python application
    ```typescript
  withEntrypoint(entrypointType: EntrypointType, entrypoint: string): PythonAppResource
  ```
- [withPip](/reference/api/typescript/aspire.hosting.python/pythonappresource/withpip.md) -- `method` -- Configures pip package installation for a Python application
    ```typescript
  withPip(install?: boolean, installArgs?: string[]): PythonAppResource
  ```
- [withUv](/reference/api/typescript/aspire.hosting.python/pythonappresource/withuv.md) -- `method` -- Configures uv package management for a Python application
    ```typescript
  withUv(install?: boolean, args?: string[]): PythonAppResource
  ```
- [withVirtualEnvironment](/reference/api/typescript/aspire.hosting.python/pythonappresource/withvirtualenvironment.md) -- `method` -- Configures the virtual environment for a Python application
    ```typescript
  withVirtualEnvironment(virtualEnvironmentPath: string, createIfNotExists?: boolean): PythonAppResource
  ```
