Skip to main content

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dynamoquick-1.0.0-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

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