apache_beam.typehints.typecheck module

Runtime type checking support.

For internal use only; no backwards-compatibility guarantees.

class apache_beam.typehints.typecheck.AbstractDoFnWrapper(dofn)[source]

Bases: apache_beam.transforms.core.DoFn

An abstract class to create wrapper around DoFn

wrapper(method, args, kwargs)[source]
start_bundle(*args, **kwargs)[source]
process(*args, **kwargs)[source]
finish_bundle(*args, **kwargs)[source]
is_process_bounded()[source]
class apache_beam.typehints.typecheck.OutputCheckWrapperDoFn(dofn, full_label)[source]

Bases: apache_beam.typehints.typecheck.AbstractDoFnWrapper

A DoFn that verifies against common errors in the output type.

wrapper(method, args, kwargs)[source]
class apache_beam.typehints.typecheck.TypeCheckWrapperDoFn(dofn, type_hints, label=None)[source]

Bases: apache_beam.typehints.typecheck.AbstractDoFnWrapper

A wrapper around a DoFn which performs type-checking of input and output.

wrapper(method, args, kwargs)[source]
process(*args, **kwargs)[source]
class apache_beam.typehints.typecheck.TypeCheckCombineFn(combinefn, type_hints, label=None)[source]

Bases: apache_beam.transforms.core.CombineFn

A wrapper around a CombineFn performing type-checking of input and output.

create_accumulator(*args, **kwargs)[source]
add_input(accumulator, element, *args, **kwargs)[source]
merge_accumulators(accumulators, *args, **kwargs)[source]
compact(accumulator, *args, **kwargs)[source]
extract_output(accumulator, *args, **kwargs)[source]
class apache_beam.typehints.typecheck.TypeCheckVisitor[source]

Bases: apache_beam.pipeline.PipelineVisitor

enter_composite_transform(applied_transform)[source]
leave_composite_transform(applied_transform)[source]
visit_transform(applied_transform)[source]