ace.tools

Subpackages

Submodules

ace.tools.services

ace.tools.transform_json

JSON Transform tool

This tool can be used to create classes from a JSON file template. (<file>.json) Classes for elements in the JSON will be created in a file. The file <file>.py will be created Sub-elements in your JSON will be created in its own class in a <element_name>.py file

To use the tools, run this file. You need to define your working directory in the root folder of your repos. The parameter isd the file location of your JSON you want to create your classes from. The created file is added in the same directory of your JSON file

WARNING:

For your parameter file, make sure to specify your path with “/” and not “” The target file is overwritten if already existing

ace.tools.transform_json.name_to_field(name_in: str)[source]
ace.tools.transform_json.get_class_name(class_name: str)[source]
ace.tools.transform_json.is_not_empty_list(json_entity, element)[source]
ace.tools.transform_json.is_dict(json_entity, element)[source]
ace.tools.transform_json.to_dict(obj)[source]
ace.tools.transform_json.create_class(class_name: str, pack_name: str, out_path: str, json_entity: dict)[source]
ace.tools.transform_json.get_class_part(path: str)[source]
ace.tools.transform_json.get_package(path: str, separator: str)[source]

Module contents