Skip to content

serbeh/boto3wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Prerequirements

  • set AWS credentials
  • boto3

Methods

Only 3 methods:

  • get
  • upload
  • list_objects
def get(self, s3_path: str, output_path: str = None) -> None:
    ...

def upload(self, file_path, s3_path, timestamp=False, force=False):
    ...

def list_objects(self, prefix=None) -> List[str]:
    ...

Usage example

import boto3wrapper

s3 = boto3wrapper.Boto3Wrapper('bucket-name', default_path='./weights')
...

s3.list_objects(prefix='weights/project/')  # List all objects under 'weights/project/'
s3.get('path-to-file-in-this-bucket.h5')  # Get some model/weight
s3.get('path-to-file-in-this-bucket.zip')  # Get some dataset
s3.upload('./weights/best.pth', 'path/to/file/in/bucket/best.pth')  # Upload resulted weight

About

Simple boto3wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages