Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudyr/roto.s3
Access and Orchestrate Amazon Simple Storage Service
https://github.com/cloudyr/roto.s3
amazon aws aws-s3 boto3 r reticulate rstats
Last synced: 3 months ago
JSON representation
Access and Orchestrate Amazon Simple Storage Service
- Host: GitHub
- URL: https://github.com/cloudyr/roto.s3
- Owner: cloudyr
- Created: 2018-07-20T18:41:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-12T19:20:28.000Z (over 6 years ago)
- Last Synced: 2024-05-21T02:52:01.603Z (6 months ago)
- Topics: amazon, aws, aws-s3, boto3, r, reticulate, rstats
- Language: R
- Size: 18.6 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: rmarkdown::github_document
---# roto.s3
Access and Orchestrate Amazon Simple Storage Service
## Description
This is a 'reticulated' wrapper for the 'Python' 'boto3' 'AWS' 'S3' client library . It requires 'Python' version 3.5+ and an 'AWS' account.
## What's Inside The Tin
The following functions are implemented: _(more to come)_
- `create_bucket`: Create a new S3 bucket
- `delete_bucket`: Delete an S3 bucket
- `download_file`: Download an S3 object to a file
- `upload_file`: Upload a file to an S3 object
- `file_exists`: Test if a file exists in the specified bucket## Installation
```{r eval=FALSE}
devtools::install_github("hrbrmstr/roto.s3")
# OR
devtools::install_git("git://gitlab.com/hrbrmstr/roto.s3")
``````{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```## Usage
```{r message=FALSE, warning=FALSE, error=FALSE}
library(roto.s3)
library(tidyverse)# current verison
packageVersion("roto.s3")```
```{r echo=FALSE}
suppressMessages(suppressWarnings(unlink("/tmp/mtcars.csv", force=TRUE)))
suppressMessages(suppressWarnings(unlink("/tmp/mtcars-01.csv", force=TRUE)))
```### Upload
```{r}
write_csv(mtcars, "/tmp/mtcars.csv")upload_file(
filename = "/tmp/mtcars.csv",
bucket = "is.rud.test",
key = "mtcars.csv",
profile_name = "personal"
)file_exists(
bucket = "is.rud.test",
key = "mtcars.csv",
profile_name = "personal"
)
```### Download
```{r}
download_file(
bucket = "is.rud.test",
key = "mtcars.csv",
filename = "/tmp/mtcars-again.csv",
profile_name = "personal"
)read_csv("/tmp/mtcars-again.csv")
```