ats_utilities.splasher.splash_keys module

Module

splash_keys.py

Copyright

Copyright (C) 2017 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Info

Defines constants for ATS splash screen keys.

class ats_utilities.splasher.splash_keys.SplashKeys(*, name: str | None = None, repository: str | None = None, organization: str | None = None, logo_path: str | None = None, use_github_infrastructure: bool | None = None, enabled: bool = True)[source]

Bases: object

Defines keys for splash screen.

It defines:

attributes:
ATS_NAME - Name of the application.
ATS_REPOSITORY - Repository URL for the application.
ATS_ORGANIZATION - Organization URL for the application.
ATS_LOGO_PATH - Path to the logo image.
ATS_USE_GITHUB_INFRASTRUCTURE - Use GitHub infrastructure (True/False).
name - Name of the application (default None).
repository - Repository URL for the application (default None).
organization - Organization URL for the application (default None).
logo_path - Path to the logo image (default None).
use_github_infrastructure - Use GitHub infrastructure (default None).
enabled - Enable/disable splash screen (default True).
methods:
__init__ - Initials SplashKeys constructor.
from_dict - Factory method to safely parse a dictionary into a SplashKeys instance.
get_all_keys - Returns a tuple of all defined ClassVar keys for the splash screen.
to_dict - Converts the SplashKeys instance to a dictionary.
ATS_LOGO_PATH: ClassVar[str] = 'ats_logo_path'
ATS_NAME: ClassVar[str] = 'ats_name'
ATS_ORGANIZATION: ClassVar[str] = 'ats_organization'
ATS_REPOSITORY: ClassVar[str] = 'ats_repository'
ATS_USE_GITHUB_INFRASTRUCTURE: ClassVar[str] = 'ats_use_github_infrastructure'
_key_to_attr: ClassVar[MappingProxyType | None] = None
enabled: bool
classmethod from_dict(config: Mapping[str, Any]) Self[source]

Factory method to safely parse a dictionary into a SplashKeys instance.

Parameters:

config (<Mapping[str, Any]>) – Configuration mapping.

Returns:

Fully initialized SplashKeys instance.

Return type:

<Self>

Exceptions:

None.

classmethod get_all_keys() tuple[str, ...][source]

Returns an immutable tuple of all defined ClassVar keys for the splash screen.

Returns:

Immutable tuple of all defined ClassVar keys for the splash screen.

Return type:

<tuple[str, …]>

Exceptions:

None.

classmethod get_key_to_attr() MappingProxyType[source]

Returns a read-only mapping of constant keys to instance attributes.

Returns:

Read-only mapping of constant keys to instance attributes.

Return type:

<MappingProxyType[str, str]>

Exceptions:

None.

logo_path: str | None
name: str | None
organization: str | None
repository: str | None
to_dict() dict[str, Any][source]

Converts the SplashKeys instance to a dictionary.

Returns:

SplashKeys instance in dict format.

Return type:

<dict[str, Any]>

Exceptions:

None.

use_github_infrastructure: bool | None