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[AppstreamComponent]

Returns a list with all components

Return type:

list[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 | None

Returns the component with the given id

Parameters:

component_id (str)

Return type:

AppstreamComponent | None

find_by_category(category: str) list[AppstreamComponent]

Returns a list with all components with the given category

Parameters:

category (str)

Return type:

list[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