Closed onufryk closed 7 years ago
Thanks for great review @erichiggins . Great comments with regard to open-source nature of the project.
Addressed all of them except the last one.
@erichiggins rebased and simplified the code, also, added a section to README
Added a boolean flag
fetch_models
to the constructor ofNdbEncoder
. The flag specifies the way to encodendb.Key
properties:fetch_models=True
(default value): the encoder will get the full entity by its key from the datastore and encode it;fetch_models=False
: the encoder will encode the ndb.Key as a tuple of (kind, id) pairs. No additional datastore read operations will be performed.Example of usage:
ndb_json.dump(data, dump_file, indent=2, sort_keys=True, fetch_models=False)