Tag lists¶
client.tag_lists is a TagLists. Its create(), get() and from_*()
methods return a TagList. See the
tag lists guide.
TagLists
¶
client.tag_lists.
list
¶
list(*, license: str | None = None, visibility: Visibility | None = None, endpoint: str | None = None, archived: bool | None = None) -> builtins.list[dict[str, Any]]
Every tag list you can see for a license (default: the client's), optionally narrowed.
create
¶
create(name: str, license: str | None = None, endpoint: str | None = None, visibility: Visibility = 'USER', handles: Iterable[Entry] | None = None, metadata: Mapping[str, Any] | None = None) -> TagList
Create a list, adding handles in chunks of 5,000.
from_rows
¶
from_rows(rows: Iterable[Mapping[str, Any]], field: str, *, name: str, license: str | None = None, endpoint: str | None = None, visibility: Visibility = 'USER') -> TagList
Create a list from one field (dotted paths allowed) of each row.
from_csv
¶
from_csv(path: str | Path, column: str, *, name: str | None = None, license: str | None = None, endpoint: str | None = None, visibility: Visibility = 'USER', delimiter: str | None = None) -> TagList
Create a list from one column of a CSV or TSV file. name defaults to the file name.
update
¶
Change a list's fields (name, visibility, metadata, archived...).
add
¶
Add or update entries, 5,000 per request. Returns created and updated counts.
remove
¶
Remove entries, 5,000 per request. Returns counts and handlesNotFound.
scan
¶
Mark entries as scanned, 5,000 per request.
resolve
¶
resolve(list_id: str, endpoint: str | None = None, *, mask: str | Sequence[str] | None = None, include: Sequence[str] | None = None, progress: bool | None = None) -> builtins.list[dict[str, Any]]
The objects the list's handles stand for, in the order they were added.
endpoint is a collection's endpoint ID, such as
METRC_ACTIVE_PACKAGES; it defaults to the list's own. Raises
TagListResolveError if any handle matches
zero objects or several.
TagList
¶
One tag list, with the TagLists methods bound to its ID.