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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyboto-0.1.4.tar.gz.
File metadata
- Download URL: pyboto-0.1.4.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b56419af6f6c5e385ce3a40dd16e94eb2f30d58f28f70fc210466bf7db2eed8
|
|
| MD5 |
5bcacd7c4feb2a68ace2ec2387e5331a
|
|
| BLAKE2b-256 |
5a52a30be7ed1706a4e78e6431e51fb237264fa85c22fbaf2cbb8842e336fc46
|
File details
Details for the file pyboto-0.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: pyboto-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5022778968b8e198362bbbca218f162df22c804d638322f5a88e4db8f1fd6170
|
|
| MD5 |
06cd41cb752bdeb076b818a9daed683e
|
|
| BLAKE2b-256 |
36174c62fecfb4b0cb61d77c642c3c4a6dfaf74a5ba869fa1a5d6c07d924e628
|