jina.drivers.encode

class jina.drivers.encode.BaseEncodeDriver(executor=None, method='encode', *args, **kwargs)[source]

Bases: jina.drivers.BaseExecutableDriver

Drivers inherited from this Driver will bind encode() by default

Initialize a BaseExecutableDriver

Parameters
  • executor (Optional[str]) – the name of the sub-executor, only necessary when jina.executors.compound.CompoundExecutor is used

  • method (str) – the function name of the executor that the driver feeds to

  • args – additional positional arguments which are just used for the parent initialization

  • kwargs – additional key value arguments which are just used for the parent initialization

runtime: Optional[ZEDRuntime]
class jina.drivers.encode.EncodeDriver(executor=None, method='encode', *args, **kwargs)[source]

Bases: jina.drivers.FlatRecursiveMixin, jina.drivers.encode.BaseEncodeDriver

Extract the content from documents and call executor and do encoding

Initialize a BaseExecutableDriver

Parameters
  • executor (Optional[str]) – the name of the sub-executor, only necessary when jina.executors.compound.CompoundExecutor is used

  • method (str) – the function name of the executor that the driver feeds to

  • args – additional positional arguments which are just used for the parent initialization

  • kwargs – additional key value arguments which are just used for the parent initialization

runtime: Optional[ZEDRuntime]