---
title: "JobClient.visualize"
description: "Create a visualization of a job as a diagram."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# JobClient.visualize

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```python
def JobClient.visualize(
  job: Job | UUID | str,
  direction: str = "down",
  layout: str = "dagre",
  sketchy: bool = True
) -> str
```

Create a visualization of a job as a diagram.

:::tip
If you are working in an interactive environment, such as Jupyter notebooks, you can use the `display` method to display the visualized job diagram directly in the notebook.
:::

## Parameters

**job**

type: Job | UUID | str

The job, job ID, or job ID string to visualize.

**direction**

type: str

The direction for the diagram to flow. For more details, see the relevant section in the [D2 documentation](https://d2lang.com/tour/layouts/#direction). Valid values are `up`, `down`, `right`, and `left`. The default value is `down`.

**layout**

type: str

The layout engine for the diagram. For further information, refer to the [D2 layout engines](https://d2lang.com/tour/layouts). Valid values are `dagre` and `elk`, with the default being `dagre`.

**sketchy**

type: bool

Indicates whether to use a sketchy, hand-drawn style for the diagram. The default is `True`.

## Returns

Rendered SVG markup for the job diagram.

<h2 id="request-example">Usage example</h2>

```python
svg = job_client.visualize(job)
Path("diagram.svg").write_text(svg)

# in a notebook
job_client.display(job)
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/JobClient.visualize/index.mdx
