# set_display_options

## nominal.core.set_display_options(*, style=None, timezone=None, time_format=None, time_precision=None, show_link=None, fetch_details=None, collapse_threshold=None, max_items=None, fetch_timeout=None, show_graph=None, graph_max_nodes=None)

Change how Nominal resources display in notebooks.

Options left out keep their current values. Called on its own, the change lasts for the rest of the Python
process. Used in a `with` block, it lasts until the block ends.

Parameters:
:   - **style** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.15)")*[**'html'**,* *'text'**]* *|* *None*)

      `"html"` shows resources as formatted cards. `"text"` shows their plain `repr`.
    - **timezone** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      Time zone for timestamps: `"UTC"`, `"local"`, or an IANA name such as `"Europe/Berlin"`.
    - **time_format** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.15)")*[**'iso'**,* *'readable'**]* *|* *None*)

      `"iso"` for ISO 8601, or `"readable"` for a space and the time zone’s name.
    - **time_precision** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.15)")*[**'s'**,* *'ms'**,* *'us'**,* *'ns'**]* *|* *None*)

      The finest unit timestamps show: `"s"`, `"ms"`, `"us"` or `"ns"`.
    - **show_link** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)") *|* *None*)

      Whether cards link resources to their pages in the Nominal app.
    - **fetch_details** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)") *|* *None*)

      Whether cards load related resources and channel statistics from Nominal.
    - **collapse_threshold** ([*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*)

      Sections with more items than this start collapsed.
    - **max_items** ([*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*)

      The most items a section lists.
    - **fetch_timeout** ([*float*](https://docs.python.org/3/builtins/functions.html#float "(in Python v3.15)") *|* *None*)

      Seconds a card waits for what it loads from Nominal, in total.
    - **show_graph** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)") *|* *None*)

      Whether cards draw a diagram of the resource and the resources around it.
    - **graph_max_nodes** ([*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*)

      The most nodes a diagram draws. The card’s own node and one node of each group of
      related resources always show, so a cap below one more than the number of groups is exceeded.

Returns:
:   A context manager that restores the previous options when its `with` block ends.

Raises:
:   [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError "(in Python v3.15)") – If an option has an invalid value, such as an unknown time zone.

Return type:
:   [*AbstractContextManager*](https://docs.python.org/3/library/contextlib.html#contextlib.AbstractContextManager "(in Python v3.15)")[[*DisplayOptions*](https://dev.nominal.io/python/ref/generated/nominal.core.DisplayOptions.md#nominal.core.DisplayOptions "nominal.core._display.DisplayOptions")]

Example

```python
from nominal.core import set_display_options

set_display_options(timezone="America/Los_Angeles", time_precision="ms")

with set_display_options(fetch_details=False):
    run  # shows only the run's own fields
```
