Skip to content

ericmiguel/botree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Botree: a friendly wrapper for boto3

Botree is a higher level API for AWS services / Boto3 classes and aims to make Boto3 experience easier.

🧰 Supported AWS services

Currently, there are just some Boto3 wrapped classes.

  • ✔️ S3
  • ✔️ Secrets
  • ✔️ CloudWatch
  • ✔️ Cost Explorer
  • ✔️ Secrets Manager

💻 Basic usage

To start a Botree session, use the following:

import botree
session = botree.session("us-east-1", profile="dev")

Create a bucket:

session.s3.create_bucket("sample-bucket")
session.s3.list_buckets()

Note that all S3 operations will use Python's pathlib to handle directory paths, so let's import it:

from pathlib import Path

Download and upload:

source_file = Path("sample_source_file.png")
target_file = Path("sample_target_file.png")
session.s3.bucket("sample-bucket").upload(source_file, target_file)
session.s3.bucket("sample-bucket").download(source_file, target_file)

📜 Docs

The docs are under development, but it's (very) early stage is already available.

🏗️ Development

Botree relies on PDM.

Install the Python dependencies with:

pdm install

⚗️ Testing

pdm run pytest --cov=botree tests/

🖖 Contributors

About

A friendly wrapper for boto3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •