Skip to main content

Amazon DAX Client for Python

Project description

The Amazon DAX Client for Python is used to access Amazon DAX clusters from Python. It is nearly source-compatible with Boto3, with only a small change needed to the client initialization to use DAX instead of DynamoDB.

Installation

Install Amazon DAX Client using pip:

$ pip install amazon-dax-client

Quick Start

Boto3 has two different interfaces, the resource interface and the botocore client interface. Both are supported by the Amazon DAX client, with slightly different client initialization.

For the resource API, change from:

ddb = boto3.resource('dynamodb')

to

dax = AmazonDaxClient.resource(
    endpoint_url='dax.abcdef.us-east-1.amazon.com')

All other boto3.resource() arguments are accepted.

For the botocore client API, change from:

session = botocore.session.get_session()
ddb = session.create_client('dynamodb', ...)

to

session = botocore.session.get_session()
dax = AmazonDaxClient(session, ...)

For Boto3 client API, change from:

ddb = boto3.client('dynamodb')

to

dax = AmazonDaxClient(endpoint_url='dax.abcdef.us-east-1.amazon.com')

The Boto3 and botocore client APIs are exactly the same.

Unsupported Features

The Amazon DAX client does not support table operations. Any table manipulation operations must use the regular Boto3 or botocore DynamoDB client.

Paginators are not currently supported for DAX.

Documentation

Once created, the interface is the same as the Boto3/botocore DynamoDB clients.

For acomplete example, follow the guide to create a sample app.

Publish

To publish:

python3 setup.py sdist bdist_wheel
./s3-upload $VERSION
twine upload dist/*

Getting Help

Please use these community resources for getting help.

Changes

v1.0.2

  • Fix Python 2 encoding issues

  • Fix decoding of ConsumedCapacity, ItemCollectionMetrics in batch operations

v1.0.1

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amazon-dax-client-1.0.2.tar.gz (83.7 kB view details)

Uploaded Source

Built Distribution

amazon_dax_client-1.0.2-py2.py3-none-any.whl (103.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file amazon-dax-client-1.0.2.tar.gz.

File metadata

File hashes

Hashes for amazon-dax-client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 39b6202a0659102c562ec99f60ff12a6aa9e3c2debada5621f942c2e405da9f4
MD5 12842d7e928e03958ebc2efa3a925271
BLAKE2b-256 180679a1b0fb9ef8d1c836551879142d91face80d4d5501136bd7b44d2b748f5

See more details on using hashes here.

File details

Details for the file amazon_dax_client-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for amazon_dax_client-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 32708dfc3b5ca1e33c65315cef81cb70f04c35567c3415403b81995f6bbec96b
MD5 85009818180b9859e8dc1fc980f79a89
BLAKE2b-256 63042dcb0583093c326e3ae76a232635d0c978d3ed3beaf37591d9de72b4279a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page