<jupyter_start><jupyter_text>S3Dynamodb¶An python wrapper on top of boto3 to communicate with S3 and DynamoDB. It checks parameters, pre- and post-process DynamoDB data to Python data (and vise-versa). To import library:<jupyter_code>from meracanapi import S3DynamoDB
print(S3DynamoDB.__doc__)
s3dyno=S3DynamoDB(BucketName="mercantest",TableName="TestTableData")<jupyter_output><empty_output><jupyter_text>upload(Filename)<jupyter_code>print(S3DynamoDB.upload.__doc__)
#Upload
item=s3dyno.upload(Filename="/home/ec2-user/environment/meracan-api/test/data/test.txt")
#Update file
s3dyno.upload(Filename="/home/ec2-user/environment/meracan-api/test/data/update.txt",id=item['id'])<jupyter_output><empty_output><jupyter_text>download(Filename)<jupyter_code>print(S3DynamoDB.download.__doc__)
s3dyno.download(Filename="test.1.txt",id=item['id'])
s3dyno.download(localFolder="",id=item['id'])<jupyter_output><empty_output><jupyter_text>delete(id)<jupyter_code>print(S3DynamoDB.delete.__doc__)
s3dyno.delete(id=item['id'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14340344168260039, 'fraction_numerical': 0.017208413001912046, 'mean_word_length': 11.925925925925926, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '387986', 'license': 'MIT', 'n_tokens_mistral': 412, 'n_tokens_neox': 405, 'n_words': 42, 'path': 'doc/s3dynamodb.ipynb', 'repo_name': 'meracan/meracan-api', 'size': '1046'}