<!-- # hard line break macro for HTML -->

# fiftyone.core.context

Context utilities.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Functions:**

| [`init_context`](#fiftyone.core.context.init_context)()                   | Initializes context settings.                                                                     |
|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| [`is_notebook_context`](#fiftyone.core.context.is_notebook_context)()     | Determines whether this process is running in a notebook context, either Jupyter or Google Colab. |
| [`is_jupyter_context`](#fiftyone.core.context.is_jupyter_context)()       | Determines whether this process is running in a Jupyter notebook.                                 |
| [`is_colab_context`](#fiftyone.core.context.is_colab_context)()           | Determines whether this process is running in Google Colab.                                       |
| [`is_databricks_context`](#fiftyone.core.context.is_databricks_context)() | Determines whether this process is running in Databricks.                                         |
| [`get_url`](#fiftyone.core.context.get_url)(address, port[, proxy_url])   |                                                                                                   |

**Exceptions:**

| [`ContextError`](#fiftyone.core.context.ContextError)   | Exception raised when an action is taken in an unsupported context.   |
|---------------------------------------------------------|-----------------------------------------------------------------------|

### fiftyone.core.context.init_context()

Initializes context settings.

### fiftyone.core.context.is_notebook_context()

Determines whether this process is running in a notebook context, either
Jupyter or Google Colab.

* **Returns:**
  True/False

### fiftyone.core.context.is_jupyter_context()

Determines whether this process is running in a Jupyter notebook.

* **Returns:**
  True/False

### fiftyone.core.context.is_colab_context()

Determines whether this process is running in Google Colab.

* **Returns:**
  True/False

### fiftyone.core.context.is_databricks_context()

Determines whether this process is running in Databricks.

* **Returns:**
  True/False

### fiftyone.core.context.get_url(address: str, port: int, proxy_url: str = None, \*\*kwargs: Dict[str, str]) → str

### *exception* fiftyone.core.context.ContextError

Bases: `OSError`

Exception raised when an action is taken in an unsupported context.

**Methods:**

| [`add_note`](#fiftyone.core.context.ContextError.add_note)(object, /)             | Exception.add_note(note) -- add a note to the exception                         |
|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [`with_traceback`](#fiftyone.core.context.ContextError.with_traceback)(object, /) | Exception.with_traceback(tb) -- set self._\_traceback_\_ to tb and return self. |

**Attributes:**

| [`args`](#fiftyone.core.context.ContextError.args)                             |                           |
|--------------------------------------------------------------------------------|---------------------------|
| [`characters_written`](#fiftyone.core.context.ContextError.characters_written) |                           |
| [`errno`](#fiftyone.core.context.ContextError.errno)                           | POSIX exception code      |
| [`filename`](#fiftyone.core.context.ContextError.filename)                     | exception filename        |
| [`filename2`](#fiftyone.core.context.ContextError.filename2)                   | second exception filename |
| [`strerror`](#fiftyone.core.context.ContextError.strerror)                     | exception strerror        |

#### add_note(object,)

Exception.add_note(note) –
add a note to the exception

#### args

#### characters_written

#### errno

POSIX exception code

#### filename

exception filename

#### filename2

second exception filename

#### strerror

exception strerror

#### with_traceback(object,)

Exception.with_traceback(tb) –
set self._\_traceback_\_ to tb and return self.
