Min-ops / cruddy

A simple CRUD wrapper around Amazon DynamoDB
Apache License 2.0
24 stars 8 forks source link

Refactoring the code, adding more error checking, support for encrypt… #3

Closed garnaat closed 8 years ago

garnaat commented 8 years ago

…ed fields (untested), and directly callable CRUD methods rather than a handler. Also fixes #2.

garnaat commented 8 years ago

Still adding tests but review appreciated.

pas256 commented 8 years ago

I am wondering whether it is useful or not to make the response an actual class with methods like is_successful.

garnaat commented 8 years ago

Perhaps. We need to make it easy to get a JSON serializable object to return from a Lambda, though.

pas256 commented 8 years ago

That is just implementing the __str__ method (or something like that) right?

garnaat commented 8 years ago

No, we would need to make sure there is a method on the response object that returned a regular Python dictionary that could be returned from the Lambda function. Lambda will then try to encode that object into JSON. We couldn't just return the response object directly.

garnaat commented 8 years ago

Ok @pas256, I think that's enough for now. Unless you have a burning desire for something more right now I think we should move on to the actions.

garnaat commented 8 years ago

Hmm, well, I need a bit more work on the response object. Update coming.