tornado_restless.wrapper – ModelWrapper

class tornado_restless.wrapper.ModelWrapper(model)[source]

Wrapper around sqlalchemy model for having some easier functions

primary_keys()[source]

Returns the primary keys

Inspired by flask-restless.helpers.primary_key_names

unique_keys()[source]

Returns the primary keys

Inspired by flask-restless.helpers.primary_key_names

foreign_keys()[source]

Returns the foreign keys

Inspired by flask-restless.helpers.primary_key_names

attributes()[source]

Returns the attributes of the model

columns()[source]

Returns the columns objects of the model

relations()[source]

Returns the relations objects of the model

hybrids()[source]

Returns the relations objects of the model

proxies()[source]

Returns the proxies objects of the model

Inspired by https://groups.google.com/forum/?fromgroups=#!topic/sqlalchemy/aDi_M4iH7d0