Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/r-dbi/backends

Details on DBI backends
https://github.com/r-dbi/backends

Last synced: about 1 month ago
JSON representation

Details on DBI backends

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# backends

[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)

List of [DBI](https://dbi.r-dbi.org) backends.

Do you maintain a backend and think that yours should be on this list?
Please open an issue in this repository.

```{r all-from-file, include = FALSE}
all_df <- jsonlite::fromJSON("docs/all.json", flatten = TRUE)
```

```{r all-url, echo = FALSE}
format_pkg <- function(name, version, title, description, date, maintainer, license, url, bugs) {

if (is.na(date)) {
date <- ""
} else {
date <- paste0(" (", date, ")")
}

if (length(url) > 0 && !anyNA(url)) {
name <- paste0("[", name, "](", url[[1]], ")")
url <- url[-1]
}

if (length(url) > 0 && !anyNA(url)) {
url <- paste0(" [:link:](", url, ")", collapse = "")
} else {
url <- ""
}

if (!is.na(bugs)) {
bugs <- paste0(" [:bug:](", bugs, ")")
} else {
bugs <- ""
}

paste0(
"## ", name, " ", version, date, url, bugs, "\n\n",

title, "\n\n",

description, "\n\n",

"Maintainer: ", maintainer, ". License: ", license, "\n\n"
)
}

knitr::asis_output(purrr::pmap_chr(all_df, format_pkg))
```

# Implementation

The list of all known DBI backends is provided as a set of static JSON files.

## Usage

### Query all packages

```{r all, eval = FALSE}
all <- httr::GET("https://r-dbi.github.io/backends/all.json")
httr::stop_for_status(all)
all_df <- httr::content(all, flatten = TRUE, simplifyVector = TRUE)
```

### Query a single package

```{r single}
first_name <- all_df$name[[1]]
first_url <- paste0("https://r-dbi.github.io/backends/by-package/", first_name, ".json")
first <- httr::GET(first_url)
httr::stop_for_status(first)
httr::content(first)
```

## Updating the database

The database is updated via `script/prepare.R` which is run daily by GitHub Actions.
Existing packages are updated directly.
For new or removed packages, pull requests are opened.

---

Please note that the 'backends' project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.