this repo has no description
at master 848 B view raw
1from src.id.nsid import NSID 2import src.lexicon.codegen 3from src.lexicon import lexicon 4 5src.lexicon.codegen.convert_lexicon( 6 lexicon( 7 { 8 "lexicon": 1, 9 "id": "com.example.getProfile", 10 "defs": { 11 "main": { 12 "type": "object", 13 "properties": { 14 "test": {"type": "string"}, 15 "test2": {"type": "array", "items": {"type": "boolean"}}, 16 }, 17 "nullables": ["test2"], 18 }, 19 "other": {"type": "object", "properties": {"int": {"type": "integer"}}}, 20 }, 21 } 22 ) 23) 24src.lexicon.codegen.regenerate_dunder_inits(NSID("com.example.getProfile")) 25 26import lex 27 28print(lex.com.example.getProfile()) 29print(lex.com.example.getProfile.other)