class A(Model):
x = Field(str, required=True)
y = Field(str, required=True)
a = A(x='abc', y='def')
a.save()
A.search_or_create(x='abc', y='def')
# This will sometimes create a new entry in the database, sometimes not (probably because of the random ordering of the resulting dict).