sites.sdk package¶
Note
In order to install the python3 client, using pip, just run the command:
pip install sites-toolkit –user -U -i https://get.ecmwf.int/repository/pypi-all/simple
Or just configure your /etc/pip.conf with the following global settings:
[global]
And then, just run the command:
pip install -U sites-toolkit
Subpackages¶
Submodules¶
sites.sdk.api_urls module¶
- class sites.sdk.api_urls.ApiUrls[source]¶
Utility class that holds all Version 1 Sites API URLs
- CUSTOM_FORMATTER = <sites.sdk.api_urls.ApiUrls.CustomKwargsFormatter object>¶
sites.sdk.client module¶
- class sites.sdk.client.SitesClient(authenticator: AuthorizationBuilder | None = None, config: Configuration = <sites.sdk.common.configuration.Configuration object>)[source]¶
SitesClient to streamline Sites API calls.
Arguments to instantiate a
SitesClient:- Parameters:
authenticator –
AuthorizationBuilder- the authenticator to be used by defaultconfig –
Configuration- optional - optionally a new configuration object
- content(site: Site, authenticator: AuthorizationBuilder | None = None) SiteContentManagement[source]¶
Creates a
SiteContentManagementto manage the content for a specific site.- Parameters:
site –
Site- the site to create the content managerauthenticator –
Authenticator- optional - optionally the authenticator for this specific site
- Returns:
SiteContentManagement- the content manager for this site
- create_site(site: Site) Dict[str, Any][source]¶
Create a new site using the provided payload and synchronize the local instance.
- Parameters:
site – the Site to create
- list(owner: str | None = None, name: str | None = None, space: str | None = None, site_type: SiteType | None = None, query: str | None = None, enabled_only: bool = False) Dict[str, Any][source]¶
Fetch a list of sites filtered by ownership, name, space, type, search query, or status.
- list_walk(owner: str | None = None, name: str | None = None, space: str | None = None, site_type: SiteType | None = None, enabled_only: bool = False) Iterator[Dict[str, Any]][source]¶
Yield sites lazily while preserving the filter options of
list().
- sites_health() Dict[str, Any][source]¶
Fetch health information specific to the Sites service layer.
- toggle_site(site: Site) Dict[str, Any][source]¶
Enable or disable the given site depending on its current state.