API Reference

Looker Client

class looker_powerpoint.looker.LookerClient[source]

Bases: object

__init__()[source]
async run_query(query_object)[source]

Runs a query against the Looker API.

Parameters:

query_object – The query object containing the necessary parameters.

async make_query(shape_id, filter=None, filter_value=None, filter_overwrites=None, id=None, **kwargs)[source]

Constructs a WriteQuery object based on a Look’s definition and provided parameters. :param id: The ID of the Look. :param filter: The name of the filter to apply. :param filter_value: The value to set for the filter. :param filter_overwrites: A dictionary of filters to overwrite with new values. :param **kwargs: Additional query parameters to set.

Returns:

A WriteQuery object representing the modified query.

Return type:

WriteQuery

Shape Discovery Tools

looker_powerpoint.tools.find_alt_text.extract_alt_text(shape)[source]

Extracts the alternative text description from a shape’s XML.

Parameters:

shape – A Shape object from pptx.

Returns:

The alternative text description, or None if not found.

Return type:

str

looker_powerpoint.tools.find_alt_text.get_presentation_objects_with_descriptions(pptx_path)[source]

Extracts all shapes from a PowerPoint presentation and returns them with descriptions.

Parameters:

pptx_path (str) – The path to the PowerPoint presentation file.

Returns:

A list of dictionaries, where each dictionary represents a shape and

contains the shape object, its description, and the slide number. Returns an empty list if the presentation cannot be opened or has no slides/shapes.

Return type:

list