models.resource

Module Contents

Classes

Model(self,attrs=None,client=None,collection=None) A base class for representing a single object on the server.
Collection(self,client=None) A base class for representing all objects of a particular type on the
class Model(attrs=None, client=None, collection=None)

A base class for representing a single object on the server.

__init__(attrs=None, client=None, collection=None)
__repr__()
__eq__(other)
__hash__()
id()

The ID of the object.

short_id()

The ID of the object, truncated to 10 characters.

reload()

Load this object from the server again and update attrs with the new data.

class Collection(client=None)

A base class for representing all objects of a particular type on the server.

__init__(client=None)
__call__(*args, **kwargs)
list()
get(key)
create(attrs=None)
prepare_model(attrs)

Create a model from a set of attributes.