> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Worker

This class provides a simple to use abstraction over the pyworker backend.
All custom implementations of pyworker can be created by configuring a Worker object.
The pyworker starts by calling Worker.run()

## Import

```python theme={null}
from vastai import Worker
```

## Constructor

```python theme={null}
Worker(config: WorkerConfig)
```

<ParamField path="config" type="WorkerConfig" required>
  config
</ParamField>

## Methods

### run\_async

```python theme={null}
async run_async()
```

### run

```python theme={null}
run()
```
