Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Usage: SQLAlchObject.to_dict() => returns a flat dict of the object SQLAlchObject.to_dict({'foo': {}}) => returns a dict of the object and will include a flat dict of object foo inside of that SQLAlchObject.to_dict({'foo': {'bar': {}}, 'spam': {}}) => returns a dict of the object, which will include dict of foo (which will include dict of bar) and dict of spam Options can also contain two special values: __columns_only__ and __columns_except__ If present, the first makes only specified fiels appear, the second removes specified fields. Both of these fields must be either strings (only works for one field) or lists (for one and more fields). SQLAlchObject.to_dict({'foo': {'__columns_except__': ['id']}, '__columns_only__': 'name'}) => The SQLAlchObject will only put its 'name' into the resulting dict, while 'foo' all of its fields except 'id'. Options can also specify whether to include foo_id when displaying related foo object (__included_ids__, defaults to True). This doesn't apply when __columns_only__ is specified. |
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Sep 10 09:30:19 2013 | http://epydoc.sourceforge.net |