curategpt.views package

Submodules

curategpt.views.namer module

Functions to map between opaque IDs and names.

class curategpt.views.namer.Namer(stores)

Bases: object

Maps between opaque IDs and names

TODO: use caching

ids_to_names(ids)

fetches mappings

Return type:

Iterator[Tuple[str, str]]

map_object(obj, paths, forward=True)

Maps an object to a new object with names instead of IDs

Return type:

Any

map_reference(ref, forward=True)

Maps a reference to a name

Return type:

str

names_to_ids(names)

fetches mappings

Return type:

Iterator[Tuple[str, str]]

stores: List[DBAdapter]

Module contents