dotenv

Loads environment variables from dotenv files https://github.com/stackbuilders/dotenv-hs

Version on this page:0.3.0.1
LTS Haskell 16.3:0.8.0.4
Stackage Nightly 2020-06-29:0.8.0.4
Latest on Hackage:0.8.0.4

See all snapshots dotenv appears in

MIT licensed by Justin Leitgeb
Maintained by [email protected]

Module documentation for 0.3.0.1

This version can be pinned in stack with:[email protected]:e4241a34801b7bd36177a07c2a49e2f2306f360d82a5cd946aead273b0b32916,3594

In most applications, configuration should be separated from code. While it usually works well to keep configuration in the environment, there are cases where you may want to store configuration in a file outside of version control.

Dotenv files have become popular for storing configuration, especially in development and test environments. In Ruby, Python and Javascript there are libraries to facilitate loading of configuration options from configuration files. This library loads configuration to environment variables for programs written in Haskell.

To use, call loadFile from your application:

import Configuration.Dotenv
loadFile False "/my/dotenvfile"

This package also includes an executable that can be used to inspect the results of applying one or more Dotenv files to the environment, or for invoking your executables with an environment after one or more Dotenv files is applied.

See the Github page for more information on this package.

Changes

Dotenv 0.3.0.1

  • Remove unnecessary package dependencies.

Dotenv 0.3.0.0

  • Reverted change to Data.Text in favor of String, for maintaining compatibility with common Haskell system libraries. Added separate interface for parsing a file into tuples containing Data.Text values. Thanks to Daisuke Fujimura (Github: fujimura).
  • Fixed parsing of CRLF characters for Windows users.

Dotenv 0.2.0.0 (deprecated)

  • Changed public interfaces to use Data.Text.
  • Added function parseFile to read dotenv file without modifying the environment. Thanks to Daisuke Fujimura (Github: fujimura) for making this contribution.

Dotenv 0.1.0.0

  • First public release.