A AWS S3 Python Adapter to Readn, Write and Check existence of files in S3 Buckets.
Project description
S3Adapter
A AWS S3 Python Adapter to Readn, Write and Check existence of files in S3 Buckets. Current version use adapter to read/write a dataframe as csv in bucket
Installation
You can install My Package using pip:
pip install s3adapter
Usage
-
Set defatut AWS Account Environment vars (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION) or call
s3adapter.init_cloud()method -
Write your code like it to write an Dataframe to your bucket
from fileadapters.s3adapter import s3adapter
import pandas as pd
bucket_name = <your-bucket>
# Creating a DataFrame from a dictionary
data = {
'Name': ['Alice', 'Bob', 'Charlie'],
'Age': [25, 30, 22],
'City': ['New York', 'San Francisco', 'Los Angeles']
}
df = pd.DataFrame(data)
# Initialize Adapter with Bucket Name and option to validate if cloud credentials is configured
s3 = s3adapter(bucket_name, validade_aws=True)
# Write dataframe as CSV
s3.write_dataframe_as_csv(df,file_path)
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 s3adapter-0.6.1.tar.gz.
File metadata
- Download URL: s3adapter-0.6.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddfa73a9c4c1e1535b6ce69f16f9b6746802d4506c5361a6421fb136a10866b9
|
|
| MD5 |
4ff964196fff95d3b8ca6dfce860dee9
|
|
| BLAKE2b-256 |
074ee1c6f21be7e1c29e6867ba637991ef459e886af8b8e9f83a7db621a71fc9
|
File details
Details for the file s3adapter-0.6.1-py3-none-any.whl.
File metadata
- Download URL: s3adapter-0.6.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5a0a450b549fa6998fe173d245d9e2a9ada2b4e2177ed1358414019aab8d696
|
|
| MD5 |
b1a6629733f5e4826b5a6ca1819f10fa
|
|
| BLAKE2b-256 |
c58b3b234930470bd8c72af4ceaf309f218c4a585e03d49b7c1d189318346956
|