Collection

class appstream_python.Collection.AppstreamCollection

Represents a Collection of multiple AppStream files

add_component(component: AppstreamComponent) None

Adds a AppstreamComponent to the collection

Parameters

component (AppstreamComponent) –

Return type

None

load_uncompressed_appstream_collection(path: str) None

Loads a uncompressed collection

Parameters

path (str) –

Return type

None

load_compressed_appstream_collection(path: str) None

Loads a GZIP compressed collection

Parameters

path (str) –

Return type

None

load_appstream_file(path: str) None

Load a appdata.xml or metainfo.xml file

Parameters

path (str) –

Return type

None

get_component_list() list[appstream_python.Component.AppstreamComponent]

Returns a list with all components

Return type

list[appstream_python.Component.AppstreamComponent]

get_component_id_list() list[str]

Returns a list with all available component id’s

Return type

list[str]

get_component(component_id: str) AppstreamComponent

Returns the component with the given id

Parameters

component_id (str) –

Return type

AppstreamComponent

find_by_category(category: str) list[appstream_python.Component.AppstreamComponent]

Returns a list with all components with the given category

Parameters

category (str) –

Return type

list[appstream_python.Component.AppstreamComponent]

get_collection_tag() Element

Gets the XML from the Collection

Return type

Element

write_uncompressed_file(path: str) None

Writes a Uncompressed collection file

Parameters

path (str) –

Return type

None

write_compressed_file(path: str) None

Writes a Uncompressed collection file

Parameters

path (str) –

Return type

None