# Data Backends (/docs/netbox/v4.3/plugins/development/data-backends)



[Data sources](/netbox/v4.3/models/core/datasource/) can be defined to reference data which exists on systems of record outside NetBox, such as a git repository or Amazon S3 bucket. Plugins can register their own backend classes to introduce support for additional resource types. This is done by subclassing NetBox's `DataBackend` class.

```python title="data_backends.py"
from netbox.data_backends import DataBackend

class MyDataBackend(DataBackend):
    name = 'mybackend'
    label = 'My Backend'
    ...
```

To register one or more data backends with NetBox, define a list named `backends` at the end of this file:

```python title="data_backends.py"
backends = [MyDataBackend]
```

<Callout type="info">
  The path to the list of data backends can be modified by setting `data_backends` in the PluginConfig instance.
</Callout>

### DataBackend [#databackend]

A data backend represents a specific system of record for data, such as a git repository or Amazon S3 bucket.

**Attributes:**

| Name                  | Type | Description                                                                         |
| --------------------- | ---- | ----------------------------------------------------------------------------------- |
| name                  | Any  | The identifier under which this backend will be registered in NetBox                |
| label                 | Any  | The human-friendly name for this backend                                            |
| is\_local             | Any  | A boolean indicating whether this backend accesses local data                       |
| parameters            | Any  | A dictionary mapping configuration form field names to their classes                |
| sensitive\_parameters | Any  | An iterable of field names for which the values should not be displayed to the user |

#### init\_config() [#init_config]

A hook to initialize the instance's configuration.
The data returned by this method is assigned to the instance's `config` attribute upon initialization, which can be referenced by the `fetch()` method.

#### fetch() [#fetch]

A context manager which performs the following: 1.
Handles all setup and synchronization 2.
Yields the local path at which data has been replicated 3.
Performs any necessary cleanup.
