Release

class appstream_python.Release.Release(version: str = '', type: Literal['stable', 'development'] = 'stable', urgency: Literal['unknown', 'low', 'medium', 'high', 'critical'] = 'unknown', date: date | None = None, date_eol: date | None = None)

Represents a <release> tag

Parameters:
  • version (str)

  • type (Literal['stable', 'development'])

  • urgency (Literal['unknown', 'low', 'medium', 'high', 'critical'])

  • date (date | None)

  • date_eol (date | None)

version: str = ''
type: Literal['stable', 'development'] = 'stable'
urgency: Literal['unknown', 'low', 'medium', 'high', 'critical'] = 'unknown'
date: date | None = None
description = <appstream_python.Shared.Description object>
date_eol: date | None = None
get_tag() _Element

Returns the XML Tag

Returns:

The Tag

Return type:

_Element

classmethod from_tag(tag: _Element) Self

Loads a release tag

Parameters:

tag (_Element)

Return type:

Self

class appstream_python.Release.ReleaseList

Represents a list of releases

type: Literal['embedded', 'external']

The type

url: str

The URL if external

load_external_releases() None

Loads the external releases from the Internet

Return type:

None

get_tag() _Element

Returns the XML Tag

Returns:

The Tag

Return type:

_Element

get_xml_string() str

Returns the XML data of the ReleaseList as string

Returns:

The XMl as string

Return type:

str

save_file(path: str | PathLike) None

Saves the Component as XML file

Parameters:

path (str | PathLike)

Return type:

None

classmethod from_tag(tag: _Element, fetch_external: bool = False) Self

Creates the list from an XMl tag

Parameters:
  • tag (_Element)

  • fetch_external (bool)

Return type:

Self

classmethod from_string(text: str) Self

Loads the Releases from a string

Parameters:

text (str)

Return type:

Self

classmethod from_file(path: str | PathLike) Self

Loads the Releases from a file

Parameters:

path (str | PathLike)

Return type:

Self

classmethod from_url(url: str) Self

Loads the Releases from a URL

Parameters:

url (str)

Return type:

Self