# SlurmMagic { #vscodenb.SlurmMagic }

```python
vscodenb.SlurmMagic()
```

IPython magics for running code in SLURM jobs.

## Methods

| Name | Description |
| --- | --- |
| [slurm](#vscodenb.SlurmMagic.slurm) | Run code in a SLURM job with optional state transfer. |

### slurm { #vscodenb.SlurmMagic.slurm }

```python
vscodenb.SlurmMagic.slurm(line, cell)
```

Run code in a SLURM job with optional state transfer.

Usage:
    %%slurm
    # your code here

    %%slurm --mem 4G --cores 4 --time 00:10:00
    # your code here with SLURM resources

    %%slurm --no-state
    # run truly isolated without state transfer