tiled.trees.in_memory.Tree

class tiled.trees.in_memory.Tree(mapping, metadata=None, access_policy=None, authenticated_identity=None, entries_stale_after=None, metadata_stale_after=None, must_revalidate=True)[source]

A Tree backed by a mapping.

__init__(mapping, metadata=None, access_policy=None, authenticated_identity=None, entries_stale_after=None, metadata_stale_after=None, must_revalidate=True)[source]

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

Parameters
mappingdict-like
metadatadict, optional
access_policyAccessPolicy, optional
authenticated_identitystr, optional
entries_stale_after: timedelta

This server uses this to communite 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 communite 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[, metadata, access_policy, ...])

Create a simple Tree from any mapping (e.g.

authenticated_as(identity)

get(k[,d])

items()

keys()

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

register_query(class_, translator)

register_query_lazy(toplevel, register)

Register a registration function which will be called if the toplevel module (e.g.

search(query)

Return a Tree with a subset of the mapping.

values()

Attributes

background_tasks

entries_stale_after

include_routers

metadata_stale_after

access_policy

authenticated_identity

entries_stale_at

items_indexer

keys_indexer

metadata

Metadata about this Tree.

metadata_stale_at

must_revalidate

query_registry

values_indexer