Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

ResourceFrontSearchFilters

Holds front-end search filter configuration for resource selection components.

This class centralizes the filter logic shared between front-end resource selection components (Streamlit and Reflex) so both use the same API to configure default filters and disabled filters sent to the DC web component.

Filters mirror the LiResourceSearchFields TypeScript class used by the front-end and keep the same camelCase keys.

:ivar filters: Dictionary of default filter values to apply to the resource search. :vartype filters: dict[str, Any] :ivar disabled_filters: Dictionary tracking which filters are disabled (the user cannot change them in the UI). :vartype disabled_filters: dict[str, bool]

Attributes
disabled_filters: dictfilters: dict
Functions
__init__

Initialize an empty set of filters.

add_column_tag_filter

Add a column tag filter to the resource search (matches columnTags).

key : str
Column tag filter key to add
value : Any
Optional column tag filter value to add
disabled : bool - False
Whether the columnTags filter is disabled in the UI
add_filter

Set a filter for the resource search.

key : str
Filter key
value : Any
Filter value
disabled : bool - False
Whether the filter is disabled in the UI
add_tag_filter

Add a tag filter to the resource search.

key : str
Tag key to filter by
value : Any
Optional tag value to filter by
disabled : bool - False
Whether the tags filter is disabled in the UI
include_not_flagged_resources

Add a filter to include not flagged resources (matches includeNotFlagged).

disabled : bool - False
Whether the includeNotFlagged filter is disabled in the UI, defaults to False
set_created_at_filter

Set the createdAt date interval filter (matches createdAt).

date_from : datetime.datetime | None
Optional lower bound of the creation date
date_to : datetime.datetime | None
Optional upper bound of the creation date
disabled : bool - False
Whether the createdAt filter is disabled in the UI
set_created_by_filter

Set the createdBy user filter (matches createdBy).

user_id : str
Identifier of the user who created the resource
disabled : bool - False
Whether the createdBy filter is disabled in the UI
set_data_filter

Set the data filter (matches data).

data : str
Data substring to filter resources by
disabled : bool - False
Whether the data filter is disabled in the UI
set_disabled_filters

Set the disabled filters for the resource search.

disabled_filters : dict
Dictionary of filter keys and their disabled status
set_filters

Set the filters for the resource search.

filters : dict
Dictionary of filters to apply
set_folder_filter

Set the folder filter (matches folder).

folder_ids : list
List of folder identifiers to filter resources by
disabled : bool - False
Whether the folder filter is disabled in the UI
set_generated_by_process_filter

Set the generatedByProcess filter (matches generatedByProcess).

process_typing_name : str
Typing name of the process that generated the resource
disabled : bool - False
Whether the generatedByProcess filter is disabled in the UI, defaults to False
set_id_filter

Set the id filter (matches id).

resource_id : str
Identifier of the resource to filter by
disabled : bool - False
Whether the id filter is disabled in the UI
set_include_children_resource

Set the includeChildrenResource flag (matches includeChildrenResource).

include_children : bool
Whether to include children resources in the search
disabled : bool - False
Whether the includeChildrenResource filter is disabled in the UI, defaults to False
set_is_archived_filter

Set the isArchived flag filter (matches isArchived).

is_archived : bool
Whether to include only archived resources
disabled : bool - False
Whether the isArchived filter is disabled in the UI
set_name_filter

Set the name filter (matches name).

name : str
Name substring to filter resources by
disabled : bool - False
Whether the name filter is disabled in the UI
set_origin_filter

Set the origin filter (matches origin).

origin : str
Resource origin identifier
disabled : bool - False
Whether the origin filter is disabled in the UI
set_resource_typing_name_filter

Set the single resource typing filter (matches resourceTypingName).

resource_typing_name : str
The resource typing name to filter by
disabled : bool - False
Whether the filter is disabled in the UI
set_resource_typing_names_filter

Set the resource typing names filter (matches resourceTypingNames).

resource_typing_names : list
List of resource typing names to filter by
disabled : bool - False
Whether the resourceTypingNames filter is disabled in the UI, defaults to False
set_scenario_filter

Set the scenario filter (matches scenario).

scenario_id : str
Identifier of the scenario to filter resources by
disabled : bool - False
Whether the scenario filter is disabled in the UI
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.