def name(self): return class_name(cls=self.cls)
def serialize(schema): """ Serialize colander ``schema``""" r = {"type": class_name(schema.typ), "name": schema.name} if schema.children: r["fields"] = [serialize(n) for n in schema.children] return r