Skip to content
/ boto3r Public

Library that encapsulate Boto3 in option.Result

License

Notifications You must be signed in to change notification settings

gilcu2/boto3r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boto3-result

Library that encapsulate Boto3 in option.Result

  • One class for each AWS service
  • Returning Result instead of throwing exception
  • Tested with library versions in requirements.txt
  • Source on github

Requirements

  • python3/pip
  • A valid boto3 configuration as explained in boto3 config

Use

pip install boto3r

Examples

    from boto3r.s3 import S3
    import os

    s3=S3.create().unwrap()
    
    S3_BUCKET = os.environ['S3_TEST_BUCKET']
    key = 'test-key'
    s = 's3_test'
    
    r=s3.put_object(S3_BUCKET, key, s) \
        .flatmap(lambda _: s3.get_attributes(S3_BUCKET, key)).flatmap()
    
    print(r.unwrap()['LastModified'])

Test running

Requirements:

  • Env vars:
    • S3_TEST_BUCKET with writing permission
./bin/run_test.sh

About

Library that encapsulate Boto3 in option.Result

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published