Exemple #1
0
class Simple(model.RootObjectModel):
    i = model.Integer(thrift_id=1)

    @classmethod
    def generate_test_object(cls):
        obj = cls()
        obj.i = 123
        return obj
Exemple #2
0
class A(model.RootObjectModel):
    s = model.String(thrift_id=1)
    i = model.Integer(thrift_id=2)
    f = model.Float(thrift_id=3)
    bt = model.Boolean(thrift_id=4)
    bf = model.Boolean(thrift_id=5)

    def __eq__(self, other):
        return self.s == other.s and self.i == other.i and self.f == other.f
Exemple #3
0
class Address(model.Model):
    street = model.String(thrift_id=1)
    number = model.Integer(thrift_id=2)
    postal_code = model.Integer(thrift_id=3)
    city = model.String(thrift_id=4)
Exemple #4
0
 class B(model.Model):
     i = model.Integer(thrift_id=1)
Exemple #5
0
 class Simple(base):
     i = model.Integer()
     s = model.String()
     b = model.Boolean()