Convert a JSON schema to a python class
问题 Is there a python library for converting a JSON schema to a python class definition, similar to jsonschema2pojo -- https://github.com/joelittlejohn/jsonschema2pojo -- for Java? 回答1: So far the closest thing I've been able to find is warlock, which advertises this workflow: Build your schema >>> schema = { 'name': 'Country', 'properties': { 'name': {'type': 'string'}, 'abbreviation': {'type': 'string'}, }, 'additionalProperties': False, } Create a model >>> import warlock >>> Country = warlock