class lumen.filters.base.Filter(**params)#

Filter components supply the filter values used by Source components to query data. .


field   required

type: str
default: ''
The field being filtered.


type: str
default: ''
A label for the Filter.


type: str
default: 'Filter'
String identifier for this object.


type: dict
default: None
The JSON schema provided by the Source declaring informationabout the data to be filtered.


type: bool
default: False
Whether the filter is shared across all layouts.


type: bool
default: True
Whether to sync the filter state with the URL parameters.


type: str
default: None
The table being filtered. If None applies to all tables.


type: Any
default: None
The current filter value.


Filter.to_spec(context: Dict[str, Any] | None = None) Dict[str, Any]#

Exports the full specification to reconstruct this component.

Return type:

Resolved and instantiated Component object


ConstantFilter type: constant

The ConstantFilter allows requesting a constant value from the

FacetFilter type: facet

The FacetFilter allows faceting the data along some dimension to

ParamFilter type: param

ParamFilter reflects the value of a parameter declared on a View.

WidgetFilter type: widget

WidgetFilter generates a Widget from the table schema provided by a Source.

BinFilter type: bins

BinFilter is a special WidgetFilter that allows selecting from a set of bins.

DateFilter type: date

DateFilter is a WidgetFilter specialized to select calendar dates.

DatetimeFilter type: datetime

DatetimeFilter is a WidgetFilter specialized to filter by datetimes.