package oenv
A composable environment variable reader
Install
dune-project
Dependency
Authors
Maintainers
Sources
oenv-0.0.1.tbz
sha256=1037dc315ff97d67ff0f7891166e9a0bb9892bfb5cf4bd1a843f0faf4963a65d
sha512=55dd36d1035c916abf726980d2952328bb080471dba9cf00974cc3f828ef8fa6898e7793b76ac36c43c9a94ddf16b258e48f5cc07ec7bd2707ee6c459752a3b6
doc/index.html
oenv: A composable environment variable reader 🧩
🏚️ Homepage: https://github.com/Nymphium/oenv
# let ( let* ) m k = Result.bind in
let* host = Oenv.(string ~secret:false "HOST" |> read) in
let* port = Oenv.(int "PORT" |> read) in
Result.ok ()
;;
utop.bc: [INFO] Found HOST: localhost
utop.bc: [INFO] Found PORT: <secret>
- : (unit, Oenv.Errors.t) result = Ok ()
Features
- Basic types: string, int, bool
- 2nd types: list, option
- Custom types
- Record
- Logging with Logs
Package
oenv
providing Oenv
module. See doc.
Development
Requires Nix and Direnv.
$ git clone https://github.com/Nymphium/oenv
$ direnv allow
$ dune build
LICENSE
This library is licensed under the MIT License.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page