Small Python library for downloading the data from AWS S3
Project description
sympan - Python library for downloading data from S3
This is a simple Python library for downloading any content from S3, locally. It is based on boto3 and joblib. It is really a simple library, but it is very useful. It uses parallel programming in Python, as well as boto3.client and boto3.resource.
Installation
Make sure you have Python 3.7 installed.
bash install.sh will do the job.
pip install sympan
will also do the job if you don't want to clone it first.
Usage
from sympan.handlers import S3Handler
from credentials import (AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY,
REGION_NAME)
if __name__ == '__main__':
s3 = S3Handler(aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
region_name=REGION_NAME)
s3.download_locally(s3_url= "s3://url/path/to/folder/or/file/",
destination_folder="local/path/to/destination/folder",
n_jobs=2)
Here credentials.py is a file where you need to put your AWS credentials. The structure in destination folder will be the same as in S3 url. Try it!:)
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
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 sympan-0.1.4.tar.gz.
File metadata
- Download URL: sympan-0.1.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb2847c8f734f10162e183fe04bfd66cab3f5c498db821f31eab0aefb2d7cbf5
|
|
| MD5 |
f96b3f318c41bb0ff041f3453de7990e
|
|
| BLAKE2b-256 |
256f56af458127102bb8daac5d723dbb6eb62bf1c3c4c7920735b3bc8aa236b3
|
File details
Details for the file sympan-0.1.4-py3-none-any.whl.
File metadata
- Download URL: sympan-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc463eafae99dc2071afa92e90f403d2e536c936572877886804049d996bd2d
|
|
| MD5 |
638ff69b7850a62da479de8d43402eff
|
|
| BLAKE2b-256 |
9e6cd1498e9b799465ef0ca476a67a729189b13f5bc5c242b2bcd22250a38840
|