---
title: Charmhub | Deploy Catalogue using Charmhub - The Open Operator Collection
description: Deploy the latest version of Catalogue as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/catalogue-k8s/libraries/catalogue
---

# Catalogue

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

Platform:

3.0/stable 148

```
juju deploy catalogue-k8s --channel 3.0/stable
```

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

[Toggle side navigation](https://charmhub.io/catalogue-k8s/libraries/catalogue#drawer)

## charms.catalogue\_k8s.v1.catalogue

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

    Fetch library

    ```
    charmcraft fetch-lib charms.catalogue_k8s.v1.catalogue
    ```

    [Download catalogue.py](https://charmhub.io/catalogue-k8s/libraries/catalogue/download)
  + *Last updated* 17 Sep 2025
  + *Revision* Library version 1.3

Charm for providing services catalogues to bundles or sets of charms.

This charm library contains two classes (CatalogueProvider and CatalogueConsumer) that handle
both sides of the `catalogue` relation interface.

###### CatalogueConsumer

The Consumer allows sending catalogue items to a Catalogue charm.

Adding it to your charm is very simple:

```
```
from charms.catalogue_k8s.v1.catalogue import (
    CatalogueConsumer,
    CatalogueItem,
)

...
    self.catalogue = CatalogueConsumer(
        charm=self,
        relation_name="catalogue",  # optional
        item=CatalogueItem(
            name="myapp",
            url=myapp_url,
            icon="rainbow",
            description="This is a rainbow app!"
        )
    )
```

The relevant events listeners are already registered by the CatalogueConsumer object.
```

###### CatalogueProvider

The Provider helps you receive catalogue items from other charms to display them however you like.

To implement this in your charm:

```
```
from charms.catalogue_k8s.v1.catalogue import CatalogueProvider

...
    self.catalogue = CatalogueProvider(
        charm=self,
        relation_name="catalogue",  # optional
    )
```

The relevant events listeners are already registered by the CatalogueProvider object.
```

---

Index

* [class CatalogueItem](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitem)
* + [def \_\_init\_\_(
    self,
    name,
    url,
    icon,
    description,
    api\_docs,
    api\_endpoints)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitem-__init__)
* [class CatalogueConsumer](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueconsumer)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name,
    item)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueconsumer-__init__)
* + [def update\_item(
    self,
    item)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueconsumer-update_item)
* + [def unit\_address(
    self,
    relation)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueconsumer-unit_address)
* [class CatalogueItemsChangedEvent](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitemschangedevent)
* + [def \_\_init\_\_(
    self,
    handle,
    items)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitemschangedevent-__init__)
* + [def snapshot(
    self)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitemschangedevent-snapshot)
* + [def restore(
    self,
    snapshot)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueitemschangedevent-restore)
* [class CatalogueEvents](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueevents)
* [class CatalogueProvider](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueprovider)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueprovider-__init__)
* + [def items(
    self)](https://charmhub.io/catalogue-k8s/libraries/catalogue#catalogueprovider-items)

#### class CatalogueItem

`CatalogueItem` represents an application entry sent to a catalogue.

Description

icon (str): An Iconify Material Design Icon (MDI) string.
(See: https://icon-sets.iconify.design/mdi for more details).
api\_docs (str): A URL to the docs relevant to this item (upstream or otherwise).
api\_endpoints (dict): A dictionary containing API information, where:
- The key is a description or name of the endpoint (e.g., "Alerts").
- The value is the actual address of the endpoint (e.g., "'http://1.2.3.4:1234/api/v1/targets/metadata'").
- Example for setting the api\_endpoints attr:
api\_endpoints={"Alerts": f"{self.external\_url}/api/v1/alerts"}

Methods

CatalogueItem.
\_\_init\_\_(

*self*

,
name: str

,
url: str

,
icon: str

,
description: str

,
api\_docs: str

,
api\_endpoints
)

#### class CatalogueConsumer

Description

`CatalogueConsumer` is used to send over a `CatalogueItem`. None

Methods

CatalogueConsumer.
\_\_init\_\_(

*self*

,
charm

,
relation\_name: str

,
item
)

CatalogueConsumer.
update\_item(

*self*

,
item: CatalogueItem
)

Description

Update the catalogue item. None

CatalogueConsumer.
unit\_address(

*self*

,
relation
)

Return the unit address of the consumer, on which it is reachable.

Description

Requires ingress to be connected for it to be routable.

#### class CatalogueItemsChangedEvent

Description

Event emitted when the catalogue entries change. None

Methods

CatalogueItemsChangedEvent.
\_\_init\_\_(

*self*

,
handle

,
items
)

CatalogueItemsChangedEvent.
snapshot(

*self*
)

Description

Save catalogue entries information. None

CatalogueItemsChangedEvent.
restore(

*self*

,
snapshot
)

Description

Restore catalogue entries information. None

#### class CatalogueEvents

Description

Events raised by `CatalogueConsumer`. None

#### class CatalogueProvider

Description

`CatalogueProvider` is the side of the relation that serves the actual service catalogue. None

Methods

CatalogueProvider.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

CatalogueProvider.
items(

*self*
)

Description

A list of apps sent over relation data. None
