Simple Python interface to Amazon DynamoDB, adding some dict-like sugar to boto.dynamodb.layer2.
Project description
Usage:
pip install dynamo_db_dict from dynamo_db_dict import dynamo_db db = dynamo_db(aws_access_key_id='YOUR KEY HERE', aws_secret_access_key='YOUR SECRET KEY HERE') # or via: os.environ, ~/.boto, /etc/boto.cfg # Set table_name_prefix='YOUR_PROJECT_NAME_' if you use the same DynamoDB account for several projects. # Either create table "user" with hash_key "email" via AWS concole, or via inherited db.create_table(...). db.user['john@example.com'] = dict(first_name='John', last_name='Johnson') # Put. No need to repeat "email" in dict(...). john = db.user['john@example.com'] # Get. assert john == dict(email='john@example.com', first_name='John', last_name='Johnson') # Complete item, with "email". assert john['first_name'] == 'John' # Key access. assert john.first_name == 'John' # Attr access. del db.user['john@example.com'] # Delete.
See also:
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
dynamo_db_dict-0.2.4.tar.gz
(2.2 kB
view details)
File details
Details for the file dynamo_db_dict-0.2.4.tar.gz.
File metadata
- Download URL: dynamo_db_dict-0.2.4.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae6d8be070628a942ce483bd1269f35218ffee041ecb352bc734022ebb01406
|
|
| MD5 |
adf3e8c061c8abe2f6044af7a765fc57
|
|
| BLAKE2b-256 |
5732e1712246383c8cdf4842c23dad19f2a903355e372ee98c5cc86674a49577
|