emod_api.schema_to_class module

class emod_api.schema_to_class.ReadOnlyDict[source]

Bases: collections.OrderedDict


Add schema node.


Write ‘clean’ config file out to disk as json. Param: config_name (defaults to ‘config.json’)


Remove all params that are disabled by depends-on param being off and schema node.

emod_api.schema_to_class.get_default_for_complex_type(schema, idmtype)[source]

This function used to be more involved and dumb but now it’s a passthrough to get_class_with_defaults. If this approach proves robust, it can probably be deprecated. Depends a bit on completeness of schema.

emod_api.schema_to_class.get_class_with_defaults(classname, schema_path=None)[source]

Returns the default config for a datatype in the schema.