jina.types.struct module

class jina.types.struct.StructView(struct)[source]

Bases: jina.types.mixin.ProtoTypeMixin, collections.abc.MutableMapping

Create a Python mutable mapping view of Protobuf Struct.

This can be used in all Jina types where a protobuf.Struct is returned, e.g. Document.tags

Create a Python dict view of Protobuf Struct.

Parameters

struct (Struct) – the protobuf Struct object

update(d, **kwargs)[source]

# noqa: DAR101 # noqa: DAR102 # noqa: DAR103

clear()[source]

# noqa: DAR101 # noqa: DAR102 # noqa: DAR103

Return type

None