apache_beam.typehints.native_type_compatibility module

Module to convert Python’s native typing types to Beam types.


Convert a given typing type to a Beam type.

Parameters:typ (type) – typing type.
Returns:The given type converted to a Beam type as far as we can do the conversion.
Return type:type
Raises:ValueError – The type was malformed.

Convert the given list or dictionary of args to Beam types.

  • args – Either an iterable of types, or a dictionary where the values are
  • types.

If given an iterable, a list of converted types. If given a dictionary, a dictionary with the same keys, and values which have been converted.