Skip to content

website

konigle.managers.website

Website managers for the Konigle SDK.

This module provides managers for website-related resources like folders, pages, blog posts, and glossary terms.

AsyncAuthorManager

Bases: BaseAuthorManager, BaseAsyncManager

Async manager for author resources.

create(data) async

Create a new author.

update(id_, data) async

Update an existing author.

AsyncBackupManager

Bases: BaseBackupManager, BaseAsyncManager

Async manager for backup resources.

create(data) async

Create a new backup.

PARAMETER DESCRIPTION
data

Backup creation data including kind, backup_type, target_id, description, and trigger.

TYPE: BackupCreate

RETURNS DESCRIPTION
Backup

Created backup resource.

restore(id_) async

Restore a backup.

PARAMETER DESCRIPTION
id_

ID of the backup to restore.

TYPE: str

RETURNS DESCRIPTION
Dict[str, str]

Dictionary with restoration status.

AsyncBlogManager

Bases: BaseBlogManager, BaseAsyncManager

Async manager for blog resources.

change_handle(id_, new_handle, redirect=False) async

Change the handle of a blog post.

create(data) async

Create a new blog post.

get_crawler_view(id_) async

Get the crawler view of a blog post.

publish(id_) async

Publish a blog post.

unpublish(id_) async

Unpublish a blog post.

update(id_, data) async

Update an existing blog post.

AsyncComponentManager

Bases: BaseComponentManager, BaseAsyncManager

Async manager for component resources.

create(data, type_='component') async

Create a new component.

update(id_, data) async

Update an existing component.

AsyncFolderManager

Bases: BaseFolderManager, BaseAsyncManager

Async manager for folder resources.

change_handle(id_, new_handle, redirect=False) async

Change the handle of a folder.

create(data) async

Create a new folder.

get_crawler_view(id_) async

Get the crawler view of a folder.

get_home_folder(detail=False) async

Get the home folder.

publish(id_) async

Publish a folder.

unpublish(id_) async

Unpublish a folder.

update(id_, data) async

Update an existing folder.

AsyncGlossaryTermManager

Bases: BaseGlossaryTermManager, BaseAsyncManager

Async manager for glossary term resources.

change_handle(id_, new_handle, redirect=False) async

Change the handle of a glossary term.

create(data) async

Create a new glossary term.

get_crawler_view(id_) async

Get the crawler view of a glossary term.

publish(id_) async

Publish a glossary term.

unpublish(id_) async

Unpublish a glossary term.

update(id_, data) async

Update an existing glossary term.

AsyncPageManager

Bases: BasePageManager, BaseAsyncManager

Async manager for page resources.

change_handle(id_, new_handle, redirect=False) async

Change the handle of a page.

create(data) async

Create a new page.

get_crawler_view(id_) async

Get the crawler view of a page.

publish(id_) async

Publish a page.

unpublish(id_) async

Unpublish a page.

update(id_, data) async

Update an existing page.

AsyncRedirectManager

Bases: BaseRedirectManager, BaseAsyncManager

Asynchronous manager for redirect resources.

create(data) async

Create a new redirect.

get(id_) async

Get a redirect by ID.

update(id_, data) async

Update an existing redirect.

AsyncStylesheetManager

Bases: BaseStyleSheetManager

Asynchronous manager for managing design system stylesheet for the website.

get_content() async

Get the content of the design system stylesheet.

RETURNS DESCRIPTION
str

The stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

set_content(content) async

Set the content of the design system stylesheet. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

AsyncTemplateManager

Bases: BaseTemplateManager, BaseAsyncManager

Async manager for template resources.

create(data) async

Create a new template.

update(id_, data) async

Update an existing template.

upgrade_to_single_component_template(id_) async

Upgrade a template to a single component template.

AsyncThemeManager

Bases: BaseThemeManager

Asynchronous manager for managing themes for the website.

get_reference_theme_template() async

Get the reference page for the current theme. Returns: str: The reference page URL or identifier.

get_theme_css() async

Get the theme css content for the website if set.

RETURNS DESCRIPTION
str

The theme CSS content. Empty string if no theme is set.

TYPE: str

set_reference_theme_template(html_content, backup=False) async

Set the reference page for the current theme.

PARAMETER DESCRIPTION
html_content

The HTML content to set as the reference page.

TYPE: str

backup

Whether to create a backup of the existing

TYPE: bool DEFAULT: False

Raises:

set_theme_css(css_content, backup=False) async

Set the theme CSS content for the website.

PARAMETER DESCRIPTION
css_content

The new theme CSS content.

TYPE: str

backup

Whether to create a backup of the existing CSS

TYPE: bool DEFAULT: False

Raises:

AsyncWebsiteJSManager

Bases: BaseWebsiteJSManager

Asynchronous manager for managing theme JS for the website.

get_theme_js() async

Get the content of the theme JS.

RETURNS DESCRIPTION
str

The theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

set_theme_js(content) async

Set the content of the theme JS. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

AsyncWebsiteManager

Bases: BaseSiteManager, BaseAsyncManager

Async Manager for managing website related information and settings

add_url(pathname, url_type='page') async

Add URL to the website. This creates nested folders as needed. Args: pathname (str): The pathname to add. Returns: dict: Containing type of page and the ID.

get() async

Get a specific for the current site.

get_business_info() async

Get the business information content.

RETURNS DESCRIPTION
str

The business information content as markdown.

TYPE: str

get_design_system() async

Get the design system content.

RETURNS DESCRIPTION
str

The design system content as markdown.

TYPE: str

get_northstar() async

Get the business northstar content.

The northstar includes business information, branding, tone, goals, target audience etc.

RETURNS DESCRIPTION
str

The business northstar content as markdown.

TYPE: str

get_robots_txt() async

Get the content of the robots.txt file for the website.

get_settings(site_id=None) async

Get website settings.

get_url(pathname, version=None) async

Get URL details from the website. Args: pathname (str): The pathname to get. version: Page version Returns: dict: Containing type of page and the ID.

get_website_info() async

Get the website information content.

RETURNS DESCRIPTION
str

The website information content as markdown.

TYPE: str

search_urls(query, types=None, limit=None, path=None) async

Search URLs from the website. Args: query (str): The search query string. types (ContentType, optional): Filter results by content type. If None, search across all content types. Defaults to None. limit (int, optional): Maximum number of results to return. path (str, optional): The base path to search under. If None, search the entire site. Defaults to None. Returns: dict: Search results containing matching URLs and their details.

set_business_info(info) async

Set the business information content.

PARAMETER DESCRIPTION
info

The business information content as markdown.

TYPE: str

set_design_system(info) async

Set the design system content.

PARAMETER DESCRIPTION
info

The design system content as markdown.

TYPE: str

set_northstar(content) async

Set the business northstar content.

The northstar includes business information, branding, tone, goals, target audience etc.

PARAMETER DESCRIPTION
content

The business northstar content as markdown.

TYPE: str

set_robots_txt(content) async

Set the content of the robots.txt file for the website.

set_settings(settings) async

Set website settings. Refer to get_settings response for schema

set_website_info(info) async

Set the website information content.

PARAMETER DESCRIPTION
info

The website information content as markdown.

TYPE: str

update(data) async

Update an existing site.

AuthorManager

Bases: BaseAuthorManager, BaseSyncManager

Manager for author resources.

create(data)

Create a new author.

update(id_, data)

Update an existing author.

BackupManager

Bases: BaseBackupManager, BaseSyncManager

Manager for backup resources.

create(data)

Create a new backup.

PARAMETER DESCRIPTION
data

Backup creation data including kind, backup_type, target_id, description, and trigger.

TYPE: BackupCreate

RETURNS DESCRIPTION
Backup

Created backup resource.

restore(id_)

Restore a backup.

PARAMETER DESCRIPTION
id_

ID of the backup to restore.

TYPE: str

RETURNS DESCRIPTION
Dict[str, str]

Dictionary with restoration status.

BlogManager

Bases: BaseBlogManager, BaseSyncManager

Manager for blog resources.

change_handle(id_, new_handle, redirect=False)

Change the handle of a blog post.

create(data)

Create a new blog post.

get_crawler_view(id_)

Get the crawler view of a blog post.

publish(id_)

Publish a blog post.

unpublish(id_)

Unpublish a blog post.

update(id_, data)

Update an existing blog post.

ComponentManager

Bases: BaseComponentManager, BaseSyncManager

Manager for component resources.

create(data, type_='component')

Create a new component.

update(id_, data)

Update an existing component.

FolderManager

Bases: BaseFolderManager, BaseSyncManager

Manager for folder resources.

change_handle(id_, new_handle, redirect=False)

Change the handle of a folder.

create(data)

Create a new folder.

get_crawler_view(id_)

Get the crawler view of a folder.

get_home_folder(detail=False)

Get the home folder.

publish(id_)

Publish a folder.

unpublish(id_)

Unpublish a folder.

update(id_, data)

Update an existing folder.

GlossaryTermManager

Bases: BaseGlossaryTermManager, BaseSyncManager

Manager for glossary term resources.

change_handle(id_, new_handle, redirect=False)

Change the handle of a glossary term.

create(data)

Create a new glossary term.

get_crawler_view(id_)

Get the crawler view of a glossary term.

publish(id_)

Publish a glossary term.

unpublish(id_)

Unpublish a glossary term.

update(id_, data)

Update an existing glossary term.

PageManager

Bases: BasePageManager, BaseSyncManager

Manager for page resources.

change_handle(id_, new_handle, redirect=False)

Change the handle of a page.

create(data)

Create a new page.

get_crawler_view(id_)

Get the crawler view of a page.

publish(id_)

Publish a page.

unpublish(id_)

Unpublish a page.

update(id_, data)

Update an existing page.

RedirectManager

Bases: BaseRedirectManager, BaseSyncManager

Manager for redirect resources.

create(data)

Create a new redirect.

get(id_)

Get a redirect by ID.

update(id_, data)

Update an existing redirect.

StylesheetManager

Bases: BaseStyleSheetManager

Manager for managing design system stylesheet for the website.

get_content()

Get the content of the design system stylesheet.

RETURNS DESCRIPTION
str

The stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

set_content(content)

Set the content of the design system stylesheet. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

TemplateManager

Bases: BaseTemplateManager, BaseSyncManager

Manager for template resources.

create(data)

Create a new template.

update(id_, data)

Update an existing template.

upgrade_to_single_component_template(id_)

Upgrade a template to a single component template.

ThemeManager

Bases: BaseThemeManager

Manager for managing themes for the website.

get_reference_theme_template()

Get the reference page for the current theme.

RETURNS DESCRIPTION
str

The reference page URL or identifier.

TYPE: str

get_theme_css()

Get the theme css content for the website if set.

RETURNS DESCRIPTION
str

The theme CSS content. Empty string if no theme is set.

TYPE: str

set_reference_theme_template(html_content, backup=False)

Set the reference page for the current theme.

PARAMETER DESCRIPTION
html_content

The HTML content to set as the reference page.

TYPE: str

backup

Whether to create a backup of the existing

TYPE: bool DEFAULT: False

Raises:

set_theme_css(css_content, backup=False)

Set the theme CSS content for the website.

PARAMETER DESCRIPTION
css_content

The new theme CSS content.

TYPE: str

backup

Whether to create a backup of the existing CSS

TYPE: bool DEFAULT: False

Raises:

WebsiteJSManager

Bases: BaseWebsiteJSManager

Manager for managing theme JS for the website.

get_theme_js()

Get the content of the theme JS.

RETURNS DESCRIPTION
str

The theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

set_theme_js(content)

Set the content of the theme JS. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

WebsiteManager

Bases: BaseSiteManager, BaseSyncManager

Manager for managing website related information and settings

add_url(pathname, url_type='page')

Add URL to the website. This creates nested folders as needed. Args: pathname (str): The pathname to add. Returns: dict: Containing type of page and the ID.

get()

Get a specific for the current site.

get_business_info()

Get the business information content.

RETURNS DESCRIPTION
str

The business information content as markdown.

TYPE: str

get_design_system()

Get the design system content.

RETURNS DESCRIPTION
str

The design system content as markdown.

TYPE: str

get_northstar()

Get the business northstar content.

The northstar includes business information, branding, tone, goals, target audience etc.

RETURNS DESCRIPTION
str

The business northstar content as markdown.

TYPE: str

get_robots_txt()

Get the content of the robots.txt file for the website.

get_settings(site_id=None)

Get website settings.

get_url(pathname, version=None)

Get URL details from the website. Args: pathname (str): The pathname to get. version: Page version Returns: dict: Containing type of page and the ID.

get_website_info()

Get the website information content.

RETURNS DESCRIPTION
str

The website information content as markdown.

TYPE: str

search_urls(query, types=None, limit=None, path=None)

Search URLs from the website. Args: query (str): The search query string. types (ContentType, optional): Filter results by content type. limit (int, optional): Maximum number of results to return. path (str, optional): The base path to search under. If None, search the entire site. Defaults to None. Returns: dict: Search results containing matching URLs and their details.

set_business_info(info)

Set the business information content.

PARAMETER DESCRIPTION
info

The business information content as markdown.

TYPE: str

set_design_system(info)

Set the design system content.

PARAMETER DESCRIPTION
info

The design system content as markdown.

TYPE: str

set_northstar(content)

Set the business northstar content.

The northstar includes business information, branding, tone, goals, target audience etc.

PARAMETER DESCRIPTION
content

The business northstar content as markdown.

TYPE: str

set_robots_txt(content)

Set the content of the robots.txt file for the website.

set_settings(settings)

Set website settings. Refer to get_settings response for schema

TODO: add schema to the docs

set_website_info(info)

Set the website information content.

PARAMETER DESCRIPTION
info

The website information content as markdown.

TYPE: str

update(data)

Update an existing site.