dotenv

Load environment variables from .env in R

https://github.com/gaborcsardi/dotenv

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Load environment variables from .env in R

Basic Info
  • Host: GitHub
  • Owner: gaborcsardi
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 29.3 KB
Statistics
  • Stars: 97
  • Watchers: 2
  • Forks: 7
  • Open Issues: 6
  • Releases: 1
Created almost 12 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---

```{r, setup, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
  comment = "##",
  error = TRUE,
  tidy = FALSE,
  fig.width = 8,
  fig.height = 8)
```


[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R build status](https://github.com/gaborcsardi/dotenv/workflows/R-CMD-check/badge.svg)](https://github.com/gaborcsardi/dotenv/actions)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/dotenv)](https://www.r-pkg.org/pkg/dotenv)
[![Coverage Status](https://img.shields.io/codecov/c/github/gaborcsardi/dotenv/master.svg)](https://codecov.io/github/gaborcsardi/dotenv?branch=master)


# dotenv — Load environment variables from .env

This package loads the variables defined in the `.env` file
in the current working directory (as reported by `getwd()`),
and sets them as environment variables.

This happens automatically when the `dotenv` package is loaded,
so the typical use-case is to just put a `library(dotenv)` call at the
beginning of your R script.

Alternatively a `dotenv::load_dot_env()` call can be used
to load variables from arbitrary files.

## Installation

```{r eval = FALSE}
install.packages("dotenv")
```

## Usage

You can simply put

```{r eval = FALSE}
library(dotenv)
```

at the beginning of your script, to load the environment variables defined
in `.env` in the current working directory.

## File format

The `.env` file is parsed line by line, and line is expected
to have one of the following formats:

```
VARIABLE=value
VARIABLE2="quoted value"
VARIABLE3='another quoted variable'
# Comment line
export EXPORTED="exported variable"
export EXPORTED2=another
```

In more details:

 * A leading `export` is ignored, to keep the file
   compatible with Unix shells.
 * No whitespace is allowed right before or after the
   equal sign, again, to promote compatilibity with Unix shells.
 * No multi-line variables are supported currently. The
   file is strictly parsed line by line.
 * Unlike for Unix shells, unquoted values are _not_
   terminated by whitespace.
 * Comments start with `#`, without any leading
   whitespace. You cannot mix variable definitions and
   comments in the same line.
 * Empty lines (containing whitespace only) are ignored.

 It is suggested to keep the file in a form that is parsed the
 same way with `dotenv` and `bash` (or other shells).

Owner

  • Name: Gábor Csárdi
  • Login: gaborcsardi
  • Kind: user
  • Location: Barcelona
  • Company: @posit-pbc

GitHub Events

Total
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 4
  • Pull request event: 1
  • Create event: 1
Last Year
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 4
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 31
  • Total Committers: 4
  • Avg Commits per committer: 7.75
  • Development Distribution Score (DDS): 0.097
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Gabor Csardi c****r@g****m 28
Tal Galili t****i@g****m 1
Jorge Cimentada c****j@g****m 1
Jon Calder j****r@g****m 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 12
  • Total pull requests: 5
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 6 months
  • Total issue authors: 10
  • Total pull request authors: 5
  • Average comments per issue: 1.75
  • Average comments per pull request: 2.6
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dshemetov (2)
  • gaborcsardi (2)
  • jbowers85 (1)
  • keen99 (1)
  • cimentadaj (1)
  • siddhant3030 (1)
  • eblondel (1)
  • ju6ge (1)
  • srinu989 (1)
  • vbakke (1)
Pull Request Authors
  • jbowers85 (1)
  • talgalili (1)
  • jonmcalder (1)
  • cimentadaj (1)
  • dshemetov (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 5,352 last-month
  • Total docker downloads: 28,160
  • Total dependent packages: 1
  • Total dependent repositories: 21
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: dotenv

Load Environment Variables from '.env'

  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 21
  • Downloads: 5,352 Last month
  • Docker Downloads: 28,160
Rankings
Downloads: 4.2%
Stargazers count: 5.0%
Dependent repos count: 6.1%
Forks count: 8.7%
Average: 10.9%
Dependent packages count: 18.2%
Docker downloads count: 23.6%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/check-pak.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage-pak.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
DESCRIPTION cran