tiled.adapters.excel.ExcelAdapter

class tiled.adapters.excel.ExcelAdapter(mapping: Dict[str, Any], *, structure: TableStructure | None = None, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, sorting: List[SortingItem] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None, entries_stale_after: timedelta | None = None, metadata_stale_after: timedelta | None = None, must_revalidate: bool = True)[source]
__init__(mapping: Dict[str, Any], *, structure: TableStructure | None = None, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, sorting: List[SortingItem] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None, entries_stale_after: timedelta | None = None, metadata_stale_after: timedelta | None = None, must_revalidate: bool = True) None

Create a simple Adapter from any mapping (e.g. dict, OneShotCachedMap).

Parameters:
mappingdict-like
metadatadict, optional
specsList[str], optional
sortingList[Tuple[str, int]], optional
specsList[str], optional
access_policyAccessPolicy, optional
entries_stale_after: timedelta

This server uses this to communicate to the client how long it should rely on a local cache before checking back for changes.

metadata_stale_after: timedelta

This server uses this to communicate to the client how long it should rely on a local cache before checking back for changes.

must_revalidatebool

Whether the client should strictly refresh stale cache items.

Methods

__init__(mapping, *[, structure, metadata, ...])

Create a simple Adapter from any mapping (e.g. dict, OneShotCachedMap).

from_file(file, **kwargs)

Read the sheets in an Excel file.

from_uri(data_uri, **kwargs)

Read the sheets in an Excel file.

get(k[,d])

get_distinct(metadata, structure_families, ...)

items()

keys()

metadata()

Metadata about this Adapter.

new_variation(*args[, mapping, metadata, ...])

read([fields])

register_query(class_, translator)

register_query_lazy(toplevel, register)

Register a registration function which will be called if the toplevel module (e.g. 'pandas') is ever loaded.

search(query)

sort(sorting)

structure()

values()

Attributes

background_tasks

entries_stale_after

include_routers

metadata_stale_after

specs

access_policy

entries_stale_at

items_indexer

keys_indexer

metadata_stale_at

must_revalidate

query_registry

sorting

structure_family

values_indexer

fn