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

# Kratos

[Identity Charmers](https://charmhub.io/publisher/identity-charmers "View all packages from Identity Charmers")

* [Identity Charmers](https://charmhub.io/publisher/identity-charmers "View all packages from Identity Charmers")

Platform:

stable 565

```
juju deploy kratos
```

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

[Toggle side navigation](https://charmhub.io/kratos/libraries/kratos_endpoints#drawer)

## charms.kratos.v0.kratos\_endpoints

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

    Fetch library

    ```
    charmcraft fetch-lib charms.kratos.v0.kratos_endpoints
    ```

    [Download kratos\_endpoints.py](https://charmhub.io/kratos/libraries/kratos_endpoints/download)
  + *Last updated* 09 Feb 2024
  + *Revision* Library version 0.5

This interface is deprecated in favor of kratos\_info.
Interface library for sharing kratos endpoints.
This library provides a Python API for both requesting and providing public and admin endpoints.

##### Getting Started

To get started using the library, you need to fetch the library using `charmcraft`.

```
cd some-charm
charmcraft fetch-lib charms.kratos.v0.kratos_endpoints
```

To use the library from the requirer side:
In the `metadata.yaml` of the charm, add the following:

```
requires:
  kratos-endpoint-info:
    interface: kratos_endpoints
    limit: 1
```

Then, to initialise the library:

```
from charms.kratos.v0.kratos_endpoints import (
    KratosEndpointsRelationError,
    KratosEndpointsRequirer,
)
Class SomeCharm(CharmBase):
    def __init__(self, *args):
        self.kratos_endpoints_relation = KratosEndpointsRequirer(self)
        self.framework.observe(self.on.some_event_emitted, self.some_event_function)
    def some_event_function():
        # fetch the relation info
        try:
            kratos_data = self.kratos_endpoints_relation.get_kratos_endpoints()
        except KratosEndpointsRelationError as error:
            ...
```

---

Index

* [class KratosEndpointsRelationReadyEvent](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationreadyevent)
* [class KratosEndpointsProviderEvents](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsproviderevents)
* [class KratosEndpointsProvider](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsprovider)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsprovider-__init__)
* + [def send\_endpoint\_relation\_data(
    self,
    admin\_endpoint,
    public\_endpoint)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsprovider-send_endpoint_relation_data)
* [class KratosEndpointsRelationError](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationerror)
* [class KratosEndpointsRelationMissingError](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationmissingerror)
* + [def \_\_init\_\_(
    self)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationmissingerror-__init__)
* [class KratosEndpointsRelationDataMissingError](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationdatamissingerror)
* + [def \_\_init\_\_(
    self,
    message)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrelationdatamissingerror-__init__)
* [class KratosEndpointsRequirer](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrequirer)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrequirer-__init__)
* + [def get\_kratos\_endpoints(
    self)](https://charmhub.io/kratos/libraries/kratos_endpoints#kratosendpointsrequirer-get_kratos_endpoints)

#### class KratosEndpointsRelationReadyEvent

Description

Event to notify the charm that the relation is ready. None

#### class KratosEndpointsProviderEvents

Description

Event descriptor for events raised by `KratosEndpointsProvider`. None

#### class KratosEndpointsProvider

Description

Provider side of the kratos-endpoint-info relation. None

Methods

KratosEndpointsProvider.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

KratosEndpointsProvider.
send\_endpoint\_relation\_data(

*self*

,
admin\_endpoint: str

,
public\_endpoint: str
)

Description

Updates relation with endpoints info. None

#### class KratosEndpointsRelationError

Description

Base class for the relation exceptions. None

#### class KratosEndpointsRelationMissingError

Description

Raised when the relation is missing. None

Methods

KratosEndpointsRelationMissingError.
\_\_init\_\_(

*self*
)

#### class KratosEndpointsRelationDataMissingError

Description

Raised when information is missing from the relation. None

Methods

KratosEndpointsRelationDataMissingError.
\_\_init\_\_(

*self*

,
message: str
)

#### class KratosEndpointsRequirer

Description

Requirer side of the kratos-endpoint-info relation. None

Methods

KratosEndpointsRequirer.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

KratosEndpointsRequirer.
get\_kratos\_endpoints(

*self*
)

Description

Get the kratos endpoints. None
