---
title: Charmhub | Deploy Harness Extensions using Charmhub - The Open Operator Collection
description: Deploy the latest version of Harness Extensions on any cloud.
url: https://charmhub.io/harness-extensions/libraries/relation_data_wrapper
---

# Harness Extensions

[Pietro Pasotti](https://charmhub.io/publisher/ppasotti "View all packages from Pietro Pasotti")

* [Pietro Pasotti](https://charmhub.io/publisher/ppasotti "View all packages from Pietro Pasotti")

Platform:

20.04

beta 3

```
juju deploy harness-extensions --channel beta
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

[Toggle side navigation](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#drawer)

## charms.harness\_extensions.v0.relation\_data\_wrapper

* [*Docstrings*Docstrings](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper)
  [*Code*Source code](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper/source-code)
* + Download

    Fetch library

    ```
    charmcraft fetch-lib charms.harness_extensions.v0.relation_data_wrapper
    ```

    [Download relation\_data\_wrapper.py](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper/download)
  + *Last updated* 19 Sep 2022
  + *Revision* Library version 0.1

This is a library providing a utility for integration testing relation databag contents.

Basic usage:

> > > from charms.harness\_extensions.v0.relation\_data\_wrapper import get\_relation\_data
> > > def test\_relation\_data():
> > > data = get\_relation\_data(requirer='app1:endpoint1', provider='app2:endpoint2')
> > > assert data.provider.application\_data == {'foo': 'bar'}
> > > assert data.provider.units\_data[0] == {'baz': 'qux'}

---

Index

* [class Metadata](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#metadata)
* [class AppRelationData](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#apprelationdata)
* [def get\_content(
  obj,
  other\_obj,
  include\_default\_juju\_keys,
  model,
  peer
  )](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#get_content)
* [class RelationData](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#relationdata)
* [def get\_peer\_relation\_data(
  )](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#get_peer_relation_data)
* [def get\_relation\_data\_from\_juju(
  )](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#get_relation_data_from_juju)
* [def get\_relation\_data\_from\_harness(
  harness
  )](https://charmhub.io/harness-extensions/libraries/relation_data_wrapper#get_relation_data_from_harness)

#### class Metadata

#### class AppRelationData

#### def get\_content(     obj: str,     other\_obj,     include\_default\_juju\_keys: bool,     model: str,     peer: bool )

Description

Get the content of the databag of `obj`, as seen from `other_obj`. None

#### class RelationData

#### def get\_peer\_relation\_data()

#### def get\_relation\_data\_from\_juju()

Get relation databags for a juju relation.

Description

> > > get\_relation\_data\_from\_juju('prometheus/0:ingress', 'traefik/1:ingress-per-unit')

#### def get\_relation\_data\_from\_harness(harness: Harness)
