mathcamp/flywheel — pull request #19 by numberoverzero (2014-09-26 06:10:34+00:00)
Title: Add optional kwarg 'attribute_name' to Field

Implements most of #16 (doesn't handle conflicts)

attribute_name, if defined, will be used as the column name
in AWS DynamoDB, while the field will still be bound to the
model by its name. For example:

class MyModel(Model):
field = Field(attribute_name='f', hash_key=True)

m = MyModel('uuid')
print(m.field) # Prints 'uuid'
get_engine().save(m, overwrite=True)

The table for this model in AWS DynamoDB would have hash key 'f'.