Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| python [2016/10/10 16:42] – alte Version wieder hergestellt (2016/03/20 23:42) gevatter | python [2016/10/10 16:42] (current) – gevatter | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== sqlalchemty ===== | ||
| + | |||
| + | ==== access columns and coumns data ==== | ||
| + | < | ||
| + | class JobStatus(Base): | ||
| + | |||
| + | ... | ||
| + | |||
| + | def __iter__(self): | ||
| + | values = vars(self) | ||
| + | for attr in self.__mapper__.columns.keys(): | ||
| + | if attr in values: | ||
| + | yield attr, values[attr] | ||
| + | |||
| + | def logme(self): | ||
| + | return dict(self) | ||
| + | </ | ||
| + | source: http:// | ||
| + | |||
| ===== json debugging, colored output ===== | ===== json debugging, colored output ===== | ||
| < | < | ||
