---
title: Charmhub | Deploy Tenant Service Operator using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Tenant Service Operator as a Kubernetes
  Operator on any cloud.
url: https://charmhub.io/tenant-service/libraries/tenant_service_info
---

# Tenant Service Operator

[prod-identity-charmhub-bot-2](https://charmhub.io/publisher/prod-identity-charmhub-bot-2 "View all packages from prod-identity-charmhub-bot-2")

* [prod-identity-charmhub-bot-2](https://charmhub.io/publisher/prod-identity-charmhub-bot-2 "View all packages from prod-identity-charmhub-bot-2")

Platform:

edge 7

```
juju deploy tenant-service --channel edge
```

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

[Toggle side navigation](https://charmhub.io/tenant-service/libraries/tenant_service_info#drawer)

## charms.tenant\_service.v0.tenant\_service\_info

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

    Fetch library

    ```
    charmcraft fetch-lib charms.tenant_service.v0.tenant_service_info
    ```

    [Download tenant\_service\_info.py](https://charmhub.io/tenant-service/libraries/tenant_service_info/download)
  + *Last updated* 28 May 2026
  + *Revision* Library version 0.1

Interface library for sharing tenant-service info.

This library provides a Python API for both providing and requesting tenant-service
deployment info, such as the HTTP service URL.

##### Getting Started

To use the library from the provider side:

In the `charmcraft.yaml` of the charm, add:

```
provides:
  tenant-service-info:
    interface: tenant_service_info
```

Then, to initialise the library:

```
from charms.tenant_service.v0.tenant_service_info import TenantServiceInfoProvider

class TenantServiceCharm(CharmBase):
    def __init__(self, *args):
        self.tenant_service_info_provider = TenantServiceInfoProvider(self)
        self.framework.observe(
            self.tenant_service_info_provider.on.ready,
            self._on_tenant_service_info_ready,
        )

    def _on_tenant_service_info_ready(self, event):
        self.tenant_service_info_provider.publish_info(service_url="http://svc:8080")
```

To use from the requirer side:

In the `charmcraft.yaml` of the charm, add:

```
requires:
  tenant-service-info:
    interface: tenant_service_info
    optional: true
```

Then, to initialise the library:

```
from charms.tenant_service.v0.tenant_service_info import TenantServiceInfoRequirer

class SomeCharm(CharmBase):
    def __init__(self, *args):
        self.tenant_service_info = TenantServiceInfoRequirer(self)
        self.framework.observe(
            self.tenant_service_info.on.tenant_service_info_changed,
            self._on_tenant_service_info_changed,
        )
```

---

Index

* [class ProviderData](https://charmhub.io/tenant-service/libraries/tenant_service_info#providerdata)
* [class TenantServiceInfoReadyEvent](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforeadyevent)
* [class TenantServiceInfoRemovedEvent](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforemovedevent)
* [class TenantServiceInfoProviderEvents](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinfoproviderevents)
* [class TenantServiceInfoRequirerEvents](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirerevents)
* [class TenantServiceInfoProvider](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinfoprovider)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinfoprovider-__init__)
* + [def update\_relations\_app\_data(
    self,
    service\_url,
    grpc\_url)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinfoprovider-update_relations_app_data)
* [class TenantServiceInfoRequirer](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer-__init__)
* + [def is\_ready(
    self)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer-is_ready)
* + [def get\_provider\_data(
    self)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer-get_provider_data)
* + [def get\_service\_url(
    self)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer-get_service_url)
* + [def get\_grpc\_url(
    self)](https://charmhub.io/tenant-service/libraries/tenant_service_info#tenantserviceinforequirer-get_grpc_url)

#### class ProviderData

Description

Data published by the tenant-service into the relation databag. None

#### class TenantServiceInfoReadyEvent

Description

Event emitted when the provider populates the relation with info. None

#### class TenantServiceInfoRemovedEvent

Description

Event emitted when the relation is removed or data is no longer available. None

#### class TenantServiceInfoProviderEvents

Description

Events for TenantServiceInfoProvider. None

#### class TenantServiceInfoRequirerEvents

Description

Events for TenantServiceInfoRequirer. None

#### class TenantServiceInfoProvider

Description

Provider side of the tenant-service-info relation. None

Methods

TenantServiceInfoProvider.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

TenantServiceInfoProvider.
update\_relations\_app\_data(

*self*

,
service\_url: str

,
grpc\_url: str
)

Description

Write service\_url and grpc\_url into all active relation databags. None

#### class TenantServiceInfoRequirer

Description

Requirer side of the tenant-service-info relation. None

Methods

TenantServiceInfoRequirer.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

TenantServiceInfoRequirer.
is\_ready(

*self*
)

Description

Return True if the relation exists and contains valid data. None

TenantServiceInfoRequirer.
get\_provider\_data(

*self*
)

Description

Return parsed ProviderData, or None if unavailable or invalid. None

TenantServiceInfoRequirer.
get\_service\_url(

*self*
)

Description

Return the tenant-service HTTP URL, or None if unavailable. None

TenantServiceInfoRequirer.
get\_grpc\_url(

*self*
)

Description

Return the tenant-service gRPC URL, or None if unavailable. None
