A simple boto3 wrapper to complete common operations in S3 such as get or put csv files, list objects and keys, etc.
Project description
pyboto
Wrapper for commonly used boto3 when working with data stored in AWS S3.
Install
Setup
Be sure to set up your AWS authentication credentials. You can do so by using the aws cli and running
pip install awscli aws configure More help on configuring the aws cli here https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
Simple Usage
import pyboto
boto_obj = pyboto.Boto('us-east-1')
result = boto_obj.get_keys('myBucket', 'myKeyPrefix')
print(result)
df = boto_obj.get_csv_as_df('myBucket', 'myKey', sep=',')
Full Usage
boto_obj.get_keys('myBucket', 'myKeyPrefix')
boto_obj.get_csv_as_df('myBucket', 'myKey', sep=',', skiprows: int, encoding: str, dtype, column_name)
boto_obj.get_file('myBucket', 'myKey')
boto_obj.get_excel('myBucket', 'myKey', engine: str)
boto_obj.put_df('myBucket', 'myKey', pandas_dataframe, header: bool, index: bool, sep=',')
boto_obj.put_file(bucket='myBucket', key='myKey', file_or_buffer=contents)
boto_obj.put_excel('myBucket', 'myKey', pandas_dataframe, header: bool, index: bool):
Note
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
pyboto-0.1.4.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for pyboto-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5022778968b8e198362bbbca218f162df22c804d638322f5a88e4db8f1fd6170 |
|
MD5 | 06cd41cb752bdeb076b818a9daed683e |
|
BLAKE2b-256 | 36174c62fecfb4b0cb61d77c642c3c4a6dfaf74a5ba869fa1a5d6c07d924e628 |