A small example package
Project description
dynamoquick
Under construction! Not ready for use yet! Currently experimenting and planning!
Developed by Zuhair (c) 2022
Examples of How To Use (1.0 Version)
Methods Available:
check_exist(client,tablename) create_table1(dynamodb,tablename,hashname,hashtype,sortname,sorttype,readcapacity,writecapacity) create_table2(dynamodb,tablename,hashname,hashtype,readcapacity,writecapacity) load_table(dynamodb,tablename,files) delete_table(dynamodb,tablename) view_table_specific(dynamodb,tablename,key,value,projection,page) update_item(dynamodb,tablename,hashname,hashvalue,updatename,updatevalue,sortname=None,sortvalue=None) delete_item(dynamodb,tablename,hashname,hashvalue,sortname=None,sortvalue=None) filter_details1(dynamodb,tablename,queriesname,queriesvalues,client) filter_details2(dynamodb,tablename,queriesnames,queriesvalues,client)
Importing in other program:
from dynamoquick import *
Sample Demo
from dynamoquick import *
import boto3
dynamodb=boto3.resource("dynamodb",endpoint_url="http://localhost:8000",region_name='us-west-2',aws_access_key_id="fakeid",aws_secret_access_key="fakekey")
client=boto3.client('dynamodb',endpoint_url='http://localhost:8000',region_name='us-west-2',aws_access_key_id='fakeid',aws_secret_access_key='fakekey')
if __name__=="__main__":
tablename=input("TableName:")
if not check_exist(client,tablename):
hashname=input("Hashname:")
hashtype=input("Hashtype:")
readcapacity=input("Readcapacity:")
writecapacity=input("Writecapacity:")
res=input("Do you have sortkey:")
if res=="yes":
sortname=input("Sortname:")
sorttype=input("Sorttype:")
create_table1(dynamodb,tablename,hashname,hashtype,sortname,sorttype,readcapacity,writecapacity)
else:
print("No Sort Key")
create_table2(dynamodb,tablename,hashname,hashtype,readcapacity,writecapacity)
print('Table Created Successfully')
else:
print('Table with name %s already existed!' % tablename)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for dynamoquick-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b62059442458f097714393e6956e74cb293b0f60525b5432be992b021353a5 |
|
MD5 | eccff8f1c23c4a88f8e1f0e2149b5ce9 |
|
BLAKE2b-256 | bca46a0a4409e9bb31cdf6d8fba7223fa808deca319bcf3a445b1d44fe636f8e |