instrukt.indexes.schema.Collection

class instrukt.indexes.schema.Collection(id: str, name: str, metadata: dict[Any, Any])[source]

Bases: NamedTuple

An index collection

Create new instance of Collection(id, name, metadata)

Methods

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

id

Alias for field number 0

metadata

Alias for field number 2

name

Alias for field number 1

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

id: str

Alias for field number 0

metadata: dict[Any, Any]

Alias for field number 2

name: str

Alias for field number 1