Commits

Author Commit Message Labels Comments Date
Éric Araujo
* Change datetime imports to make mocking easier.
Max Noel
* Added default value (now UTC) for datetime.datetime fields when building an instance with from_dict.
Éric Araujo
* Add support for datetimes using "Z" as timezone info
Max Noel
* in to_json_dict, sets are now converted to sorted lists. Makes for more consistency and predictability.
Éric Araujo
* Fix datetime format to comply with W3CDTF
Max Noel
* Version 1.4.0: consistent reads, datetime values, json_list/json_dict replaced by list/dict.
Max Noel
* to_json_dict now uses strftime explicitly to format datetime objects, because the built-in __str__ outputs the zone as +HH:MM instead of +HHMM.
Max Noel
* _python_to_dynamodb no longer needs an explicit schema_type argument (it's inferred from the value's type).
Max Noel
* "magic" (datetime/list/dict) values are now supported as keys. Note that they're not yet handled in query/scan conditions.
Max Noel
* Removed stale comment. consistent_reads *is* implemented.
Max Noel
* Added support for datetime.datetime attributes -- serialized as iso-formatted, UTC strings. You can use them as hash or range keys too. Note that they *must* be timezone-aware -- attempting to save a naive (timezone-less) object will raise ValueError.
Max Noel
* Refactored serialization -- json_list and json_dict are no longer needed and have therefore been removed, please use list and dict directly instead.
Max Noel
* Added consistent_read flag to get and query.
Max Noel
* query and scan now return generators.
Max Noel
* Expected values: empty strings/sets are now correctly expected to be missing attributes (since DynamoDB can't store them). Added unit tests for the feature.
Max Noel
* autoincrement_int: it's better if we actually *raise* MaxRetriesExceededError. That'll teach me to commit untested code -- there, have a unit test too.
Max Noel
* Better "retrying" reporting (now using log.debug instead of a comment in the source).
Max Noel
* Added MAX_RETRIES protection to _save_autoincrement_hash_key.
Max Noel
* json.dumps calls now use sort_keys=True (which will help a lot in expected_values calls with json_dict/list params.
Max Noel
* Added expected_values argument to DynamoDBModel.save.
Max Noel
* Tests for autoincrement_int hash_keys.
Max Noel
* autoincrement_int keys no longer overwrite data when items with explicitly-set hash_keys were manually put in the DB.
Max Noel
* Unit tests: Extracted common code for dummy classes. Less lines, same tests, yay!
Max Noel
* Fixed a bug (and added a test that reproduces it) where to_db_dict wouldn't, in fact, json.dumps the json_* datatypes.
Max Noel
* Always access class (not instance) attributes for __table__/__schema__/__hash_key__/__range_key__. More uniform and allows for some metaclass trickery.
Max Noel
* Using type(self).__table__ instead of self.__table__ to fix a metaclassy use case where __table__ was made a class property. Will do the same to __hash_key__, __range_key__ and __schema__ if it keeps being a problem.
Max Noel
* Added support (and tests) for json_list and json_dict datatypes.
Max Noel
* Fixed empty string storage: Since DynamoDB can't store them, we're using the same trick as for empty sets and storing them as missing attributes.
Max Noel
* Split DynamoDBModel.to_dict() into to_db_dict() and to_json_dict(), since everyone (and most importantly Ludia) is doing JSON serialization, which doesn't have sets.
Tags
1.1.0
Max Noel
* Added allow_overwrite optional parameter (default=True) to DynamoDBModel.save(). When set to False, OverwriteError will be raised if the save() call would overwrite something in the database (primary key(s) already taken).
  1. Prev
  2. Next