Release
- class appstream_python.Release.Release(version: str = '', type: Literal['stable', 'development'] = 'stable', urgency: Literal['unknown', 'low', 'medium', 'high', 'critical'] = 'unknown', date: Optional[date] = None, date_eol: Optional[date] = None)
Represents a <release> tag
- Parameters
version (str) –
type (Literal['stable', 'development']) –
urgency (Literal['unknown', 'low', 'medium', 'high', 'critical']) –
date (datetime.date | None) –
date_eol (datetime.date | None) –
- version: str = ''
- type: Literal['stable', 'development'] = 'stable'
- urgency: Literal['unknown', 'low', 'medium', 'high', 'critical'] = 'unknown'
- date: datetime.date | None = None
- description = <appstream_python.Shared.Description object>
- date_eol: datetime.date | None = None
- get_tag() Element
Returns the XML Tag
- Returns
The Tag
- Return type
Element
- 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 | os.PathLike) None
Saves the Component as XML file
- Parameters
path (str | os.PathLike) –
- Return type
None
- classmethod from_tag(tag: _Element, fetch_external: bool = False) ReleaseList
Creates the list from an XMl tag
- Parameters
tag (_Element) –
fetch_external (bool) –
- Return type
- classmethod from_string(text: str) ReleaseList
Loads the Releases from a string
- Parameters
text (str) –
- Return type
- classmethod from_file(path: str | os.PathLike) ReleaseList
Loads the Releases from a file
- Parameters
path (str | os.PathLike) –
- Return type
- classmethod from_url(url: str) ReleaseList
Loads the Releases from a URL
- Parameters
url (str) –
- Return type