Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericmiguel/botree
A friendly wrapper for boto3.
https://github.com/ericmiguel/botree
Last synced: 7 days ago
JSON representation
A friendly wrapper for boto3.
- Host: GitHub
- URL: https://github.com/ericmiguel/botree
- Owner: ericmiguel
- License: mit
- Created: 2021-11-02T00:45:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T19:52:30.000Z (over 1 year ago)
- Last Synced: 2024-08-11T00:29:01.314Z (6 months ago)
- Language: Python
- Homepage:
- Size: 702 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```Python
import botree
session = botree.session("us-east-1", profile="dev")
```Create a bucket:
```Python
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:
```python
from pathlib import Path
```Download and upload:
```Python
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](https://ericmiguel.github.io/botree/).
## 🏗️ Development
Botree relies on [PDM](https://pdm.fming.dev/latest/).
Install the Python dependencies with:
```bash
pdm install
```## ⚗️ Testing
```bash
pdm run pytest --cov=botree tests/
```## 🖖 Contributors