uhugo.post_install.providers.cloudflare

class uhugo.post_install.providers.cloudflare.Cloudflare(api_key: str | None = None, email_address: str | None = None, account_id: str | None = None, hugo_version: str | None = None)[source]

Cloudflare provider

Parameters:
  • hugo_version – New Hugo version

  • api_key – Authentication key for Cloudflare

  • email_address – Registered email address

  • account_id – Cloudflare worker account ID

Raises:

ValueError – If email_address and account_id is not provided

current_version(project_name: str | None = None) str | None[source]

Gets the current Hugo version

Parameters:

project_name – Name of the project to check from

get_projects(project_name: str | None = None) Response[source]

This checks and gets the projects available

Parameters:

project_name – Name of the project to get

Returns:

Returns HTTP response

update_api(project_name: str) Response[source]

Updates Cloudflare Pages environment variable of HUGO_VERSION.

Parameters:

project_name – Name of the project to update

Returns: