vantage6.backend.common.jsonable.jsonable#
- jsonable(value)#
Convert a (list of) SQLAlchemy instance(s) to native Python objects.
- Parameters:
value (list[DeclarativeMeta] | DeclarativeMeta) – A single SQLAlchemy instance or a list of SQLAlchemy instances
- Returns:
A single Python object or a list of Python objects
- Return type:
list | dict
- Raises:
Exception – If the value is not an instance of db.Base or a list of db.Base