jina.jaml.parsers.flow.legacy module

class jina.jaml.parsers.flow.legacy.LegacyParser[source]

Bases: jina.jaml.parsers.base.VersionedYAMLParser

The legacy parser.

version = 'legacy'

the version number this parser designed for

parse(cls, data)[source]
Parameters
  • cls (Type[Flow]) – target class type to parse into, must be a JAMLCompatible type

  • data (Dict) – flow yaml file loaded as python dict

Return type

Flow

Returns

the Flow YAML parser given the syntax version number

dump(data)[source]
Parameters

data (Flow) – versioned flow object

Return type

Dict

Returns

the dictionary given a versioned flow object