39

I'm currently using hbase with my Python apps and wanted to try out Amazon DynamoDB. Is there a way to use Python to read, write and query data?

1
  • 3
    Is there any abstraction layer that supports DynamoDB as well as other NoSQL databases? Commented Jan 23, 2012 at 8:21

5 Answers 5

29

You can use boto3: https://github.com/boto/boto3

docs: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/dynamodb.html

api reference: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html

Sign up to request clarification or add additional context in comments.

Comments

29

Another alternative is PynamoDB. PynamoDB provides an ORM like interface to DynamoDB and supports both Python 2 and Python 3. The entire DynamoDB API is supported by PynamoDB - including global and local secondary indexes, batch operations, binary attributes, queries, scans, etc.

Disclaimer: I wrote PynamoDB.

2 Comments

As of the time of this comment DAX isn't supported by PynamoDB. Hopefully the pull requests that adds support for it will be added at some point, but right now I'm having to use boto3 and make all the queries by hand with amazon-dax-client.
Wow - PynamoDB is awesome!
14

Disclaimer: I'm the current maintainer

You can use Dynamodb-mapper Python library. It's a simple/tiny abstraction layer that allows you to map plain Python object to DynamoDB. It also features a transaction engine.

For advanced tasks such as table management it is still better to directly use Boto (which we rely on, anyway).

Comments

3

This question has been years so I believe your problem was already resolved. Just want to mention that you could use boto3 to access DynamoDB as well nowadays.

Comments

3

I'm the author of Lucid-Dynamodb, a minimalist wrapper to AWS DynamoDB. It covers all the Dynamodb operations.

Reference: https://github.com/dineshsonachalam/Lucid-Dynamodb

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.