---
title: Charmhub | Deploy Cloudflare Configurator using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Cloudflare Configurator on any cloud.
url: https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route
---

# Cloudflare Configurator

[Weii Wang](https://charmhub.io/publisher/weii-wang "View all packages from Weii Wang")

* [Weii Wang](https://charmhub.io/publisher/weii-wang "View all packages from Weii Wang")

Platform:

24.04

edge a860307c

```
juju deploy cloudflare-configurator --channel edge
```

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

[Toggle side navigation](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#drawer)

## charms.cloudflare\_configurator.v0.cloudflared\_route

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

    Fetch library

    ```
    charmcraft fetch-lib charms.cloudflare_configurator.v0.cloudflared_route
    ```

    [Download cloudflared\_route.py](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route/download)
  + *Last updated* 20 Dec 2024
  + *Revision* Library version 0.3

#### Interface Library for cloudflared\_route.

This library wraps relation endpoints using the `cloudflared_route` interface
and provides a Python API for both requesting and providing cloudflared-route
integrations.

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

```
cd some-charm
charmcraft fetch-lib charms.cloudflare_configurator.v0.cloudflared_route
```

In the `metadata.yaml` of the charm, add the following:

```
requires:
    cloudflared-route:
        interface: cloudflared_route
```

---

Index

* [class InvalidIntegration](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#invalidintegration)
* [class CloudflaredRouteProvider](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouteprovider)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouteprovider-__init__)
* + [def set\_tunnel\_token(
    self,
    tunnel\_token,
    relation)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouteprovider-set_tunnel_token)
* + [def unset\_tunnel\_token(
    self,
    relation)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouteprovider-unset_tunnel_token)
* + [def set\_nameserver(
    self,
    nameserver,
    relation)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouteprovider-set_nameserver)
* [class CloudflaredRouteRequirer](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouterequirer)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouterequirer-__init__)
* + [def get\_tunnel\_token(
    self,
    relation)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouterequirer-get_tunnel_token)
* + [def get\_nameserver(
    self,
    relation)](https://charmhub.io/cloudflare-configurator/libraries/cloudflared_route#cloudflaredrouterequirer-get_nameserver)

#### class InvalidIntegration

Description

Charm received invalid integration data. None

#### class CloudflaredRouteProvider

Description

cloudflared-route provider. None

Methods

CloudflaredRouteProvider.
\_\_init\_\_(

*self*

,
charm

,
relation\_name: str
)

CloudflaredRouteProvider.
set\_tunnel\_token(

*self*

,
tunnel\_token: str

,
relation
)

Set cloudflared tunnel-token in the integration.

Arguments

tunnel\_token

The tunnel-token to set.

relation

The relation to set the tunnel-token to, if the relation is None, using the
only existing cloudflared-route relation.

CloudflaredRouteProvider.
unset\_tunnel\_token(

*self*

,
relation
)

Unset cloudflared tunnel-token in the integration.

Arguments

relation

The relation to remote the tunnel-token from, if the relation is None, using
the only existing cloudflared-route relation.

CloudflaredRouteProvider.
set\_nameserver(

*self*

,
nameserver

,
relation
)

Set or unset the nameserver used by the Cloudflared tunnel.

Arguments

nameserver

The nameserver used by the Cloudflared tunnel.

relation

The relation to remote the tunnel-token from, if the relation is None, using
the only existing cloudflared-route relation.

#### class CloudflaredRouteRequirer

Description

cloudflared-route requirer. None

Methods

CloudflaredRouteRequirer.
\_\_init\_\_(

*self*

,
charm

,
relation\_name: str
)

CloudflaredRouteRequirer.
get\_tunnel\_token(

*self*

,
relation
)

Get cloudflared tunnel-token from cloudflared-route integrations.

Arguments

relation

relation to receive the tunnel-token from.

Returns

cloudflared tunnel-token.

CloudflaredRouteRequirer.
get\_nameserver(

*self*

,
relation
)

Get the nameserver used by the Cloudflared tunnel.

Arguments

relation

relation to receive the tunnel-token from.

Returns

the nameserver used by the Cloudflared tunnel.
