uhugo.post_install.providers.cloudflare

class uhugo.post_install.providers.cloudflare.Cloudflare(api_key: str = None, email_address: str = None, account_id: str = None, hugo_version: str = 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) str | None[source]

Gets the current Hugo version

Parameters:

project_name – Name of the project to check from

get_projects(project_name: str = 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: