from src.id.nsid import NSID import src.lexicon.codegen from src.lexicon import lexicon src.lexicon.codegen.convert_lexicon( lexicon( { "lexicon": 1, "id": "com.example.getProfile", "defs": { "main": { "type": "object", "properties": { "test": {"type": "string"}, "test2": {"type": "array", "items": {"type": "boolean"}}, }, "nullables": ["test2"], }, "other": {"type": "object", "properties": {"int": {"type": "integer"}}}, }, } ) ) src.lexicon.codegen.regenerate_dunder_inits(NSID("com.example.getProfile")) import lex print(lex.com.example.getProfile()) print(lex.com.example.getProfile.other)