pynamodb / PynamoDB

A pythonic interface to Amazon's DynamoDB
http://pynamodb.readthedocs.io
MIT License
2.44k stars 427 forks source link

Updating an item without getting it first #473

Open kappa90 opened 6 years ago

kappa90 commented 6 years ago

Would it be possible to update an item without getting it first?

As far as I understand this is possible with the DynamoDB API, as long as you know the hash/range keys.

Thanks

alexanderfanz commented 6 years ago

Maybe this can help you a little:

446

take a look good luck

amirvaza commented 5 years ago

@alexanderfanz What about something like that: user.update(actions=[User.Requests.set(User.Requests + 1)]) Obviously i get "The provided expression refers to an attribute that does not exist in the item" Any solution?

bpsoos commented 2 months ago

Hello, when trying to answer this question I ran into a bug, which is tracked in this issue now: #1247

bpsoos commented 2 months ago

I also tried updating an item without getting it first by using the low level api's update_item but ran into a bug this way as well. That issue is tracked here: #1249