steward

Library for easy converting between plain JSON-like data and compound structure of user defined class i...
Download

steward Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Andrew Svetlov
  • Publisher web site:
  • https://github.com/asvetlov/

steward Tags


steward Description

steward is a Python library for easy converting between plain JSON-like data (numbers, strings, lists and dicts) and compound user-defined classes.Trivial example:>>> from steward import *>>> class Comp(Component):... a = Field()... b = Field(default=1)...>>> v = Comp(a=0)>>> dct = v.as_plain()>>> dct{'a': 0, 'b': 1}>>> v2 = Comp.from_plain(dct)>>> v2.a0>>> v2.b1>>> v2.a = 7>>> v2.as_plain(){'a': 7, 'b': 1}Product's homepage


steward Related Software