Open trondhindenes opened 6 years ago
I've also found a function (in addition to a prefix or template string) is very useful for automated testing, where I'd use a nonce to isolate integration tests:
nonce = lambda model: model.Meta.table_name + str(time.time())
I think this needs to be somewhere on the Connection
object, looking through https://pynamodb.readthedocs.io/en/latest/low_level.html#creating-a-connection
This would be so useful
Were tables names globally unique in 2018? They certainly don't seem to be now:
Names should be meaningful and concise—for example, names such as Products, Books, and Authors are self-explanatory.
Since DynamoDB tables are globally unique, it's a bit cumbersome to store the table name inside the model class. It would be awesome to be able to set a "table prefix" on the connection object or similar, so that the model classes themselves could be static and not require dynamic configuration injected. This would allow scenarios like dev/test inside the same aws account etc.