[ANN] DotEnv.jl 1.0

I’ve recently resurrected the DotEnv.jl package, and am delighted to announce the 1.0 release! :partying_face:

The codebase has been entirely rewritten, and should now be both more robust and featureful.
In particular, we now have:

  • A specified .env parsing methodology, with support for everything but multi-line values and shell execution from the canonical (Ruby) .env implementation. This includes
    • Interpolated values, e.g. $foo
    • Default values, e.g. ${foo:-bar}
  • The ability to load and unload multiple .env files, and have values and interpolations re-resolved correctly
  • The ability to load .env files into arbitrary Dict{String,String}s
  • Functions (config/parse) to read/parse a .env file without modifying any env dicts

Enjoy!


I’m well aware that in the meantime ConfigEnv.jl has popped up, but I think it’s well worth having DotEnv.jl be a great package for .env files in its own right. Comparatively, ConfigEnv has a more sophisticated/complicated methodology for resolving dependencies in interpolations (I just run with the “if it works in the shell, it will work here, and vice versa” approach), and does not support the unloading functionality implemented in DotEnv.

20 Likes