here.platform.schema.parser module#

HERE Platform Parser module

class here.platform.schema.parser.Parser[source]#

Bases: ABC

Base class for parsing data of a catalog layer partition.

LAYER_DESCRIPTORS = 'layer.fds'#
LAYER_MANIFEST = 'layer.manifest.json'#
static extract_layer_info(input_zip: str | Path | BytesIO) Tuple[dict | None, bytes | None][source]#

Extract layer info from an input zipfile.

Parameters:

input_zip – input Protobuf schema zipfile

Returns:

content of the layer manifest and descriptor set

abstract parse_message(message: bytes) Message | dict[source]#

Parse a message and returns the corresponding partition class instance.

Parameters:

message – message received as blob

Returns:

parsed message

abstract serialize_bytes(data: Message | dict) bytes[source]#

Parse a message and returns the bytes.

Parameters:

data – message

Returns:

bytes