avro_to_python.utils.avro package

Submodules

avro_to_python.utils.avro.helpers module

contains helper function for parsing avro schema

avro_to_python.utils.avro.helpers.dedupe_imports(imports: List[avro_to_python.classes.reference.Reference]) → None[source]

Dedupes list of imports

imports: list of dict
list of imports of a file
None
avro_to_python.utils.avro.helpers.get_union_types(field: avro_to_python.classes.field.Field, PRIMITIVE_TYPE_MAP: dict = {'boolean': 'bool', 'bytes': 'bytes', 'double': 'float', 'float': 'float', 'int': 'int', 'long': 'int', 'null': 'None', 'string': 'str'}) → str[source]

Takes a field object and returns the types of the fields

field: dict
dictionary resembling a field for a union type
PRIMITIVE_TYPE_MAP: dict
lookup table mapping avro types to python types
out_types: str
comma seperated string of python types
avro_to_python.utils.avro.helpers.split_namespace(s: str) → Tuple[str, str][source]

Splits a namespace and name into their parts

s: str
string to be split
(tuple)
namespace: str name: str

avro_to_python.utils.avro.primitive_types module

file containing primitive types for avro

Module contents