TonyFlury / py-importjson

Import json data into python as a module, complete with auto creation of classes, class and instance data attributes, __init__ methods and more.
8 stars 3 forks source link

Better definition of Class Attributes #17

Open TonyFlury opened 8 years ago

TonyFlury commented 8 years ago

It should be possible to define class attributes in the same way as Instance attributes - for instance be able to distinguish between Instance and class attributes within the JSON by name alone, and be able to define constraints on class attributes.

TonyFlury commented 8 years ago

Note - There is no @classproperty specifically in Python - would need to implement one :

http://stackoverflow.com/questions/5189699/how-can-i-make-a-class-property-in-python

Maybe a separate module within importjson - so we have importjson.classproperty