Library of helper modules for common data tasks using AWS resources such as S3, SQS, MTurk and others
Project description
larrydata
Library of utilities for common data tasks using AWS. While boto3 is a great interface for interacting with AWS services, it can be overly complex for data scientists and others who want to perform simple operations on data without worrying about API-specific interactions and parameters. Larrydata provides a simple wrapper for S3, MTurk, and other data-oriented services to let you focus on the data rather than syntax.
For example, the following is all it takes to read a JSON formatted object from S3 into a dict:
from larrydata import s3
my_dict = s3.read_dict(bucket='mybucket', key='myfile.json')
# Alternatively, you can use S3 URIs to access your data
my_dict2 = s3.read_dict(uri='s3://mybucket/myfile.json')
To write files to S3, simply calling write_object
will write your object out in the appropriate format:
from larrydata import s3
# Write json to S3
my_dict = {'key': 'val'}
s3.write_object(my_dict, bucket='mybucket', key='myfile.json')
# Write a list of strings to S3 as rows
my_list = ['a','b','c','d']
s3.write_object(my_list, bucket='mybucket', key='myfile.txt')
# Write a JSON lines file to S3
my_dictlist = [{'a': 1}, {'b': 2}, {'c': 3}]
s3.write_object(my_dictlist, bucket='mybucket', key='myfile.jsonl')
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 Distribution
Built Distribution
Hashes for larrydata-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6522c1704bf15f6cf488d821676aaa658c2aa8f977a2b2c171f042b6f0f90739 |
|
MD5 | 549fe7a182dd45a9a3e066a48f4d4df5 |
|
BLAKE2b-256 | e108e2527d7ae190cc777536fb14058f17af104d8a623f8ed3c34b4750be118e |