avro_to_python.writer package¶
Submodules¶
avro_to_python.writer.writer module¶
Writer class for writing python avro files
-
class
avro_to_python.writer.writer.AvroWriter(tree: dict, pip: str = None, author: str = None, package_version: str = None)[source]¶ Bases:
objectwriter class for writing python files
Should initiate around a tree object with nodes as:
- {
- ‘children’: {}, ‘files’: {}, ‘visited’: False
}
The “keys” of the children are the namespace names along avro namespace paths. The Files are the actual files within the namespace that need to be compiled.
Note: The visited flag in each node is only for node traversal.
This results in the following behavior given this sample tree:
- tree = {
- ‘children’: {‘test’: {
- ‘children’: {}, ‘files’: {‘NestedTest’: …}, ‘visited’: False
}}, ‘files’: {‘Test’ …}, ‘visited’: False
}
files generated: /Test.py /test/NestedTest.py
-
files= []¶
-
root_dir= None¶