Generates transfer classes based on definitions provided in .xml
files, inspired by Symfony's transfer generator.
At present, the generated transfer classes provide:
- Getters and setters for the fields
- Adders for dicts and lists (although you can of course set them too)
- A
modified
meta dict, with individualis_modified_...
methods for each field
- Define the classes you need using
.xml
files, the names of which end in..._transfers.xml
.- The structure these files should have is exemplified by the
IN/sample_transfers.xml
andOUT/second_sample_transfers.xml
files.
- The structure these files should have is exemplified by the
- You can either put these files in the
IN
directory, where the sample files are...- (the two sample files are considered as part of the repo but any other
_transfers.xml
files put there will be ignored)
- (the two sample files are considered as part of the repo but any other
- ...OR you can provide custom input as well as custom output paths by using the
-i
/--input_path
and the-o
/--output_path
command line arguments, respectively.- If provided, they will be used, if not, the default paths (
IN/
andOUT/
in the repo root) will be used.
- If provided, they will be used, if not, the default paths (
generate.py
- will run with the default values
generate.py -i my_transfer_xmls -o my_generated_transfers
- will use the my_transfer_xmls
input and the my_generated_transfers
output paths, respectively.